1 error: usage of `contains_key` followed by `insert` on a `HashMap`
4 13 | if !m.contains_key(&k) { m.insert(k, v); }
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k).or_insert(v)`
7 note: lint level defined here
10 5 | #![deny(map_entry)]
13 error: usage of `contains_key` followed by `insert` on a `HashMap`
14 --> $DIR/entry.rs:20:5
16 20 | if !m.contains_key(&k) { foo(); m.insert(k, v); }
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
19 error: usage of `contains_key` followed by `insert` on a `HashMap`
20 --> $DIR/entry.rs:27:5
22 27 | if !m.contains_key(&k) { m.insert(k, v) } else { None };
23 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
25 error: usage of `contains_key` followed by `insert` on a `HashMap`
26 --> $DIR/entry.rs:34:5
28 34 | if m.contains_key(&k) { None } else { m.insert(k, v) };
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
31 error: usage of `contains_key` followed by `insert` on a `HashMap`
32 --> $DIR/entry.rs:41:5
34 41 | if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
35 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
37 error: usage of `contains_key` followed by `insert` on a `HashMap`
38 --> $DIR/entry.rs:48:5
40 48 | if m.contains_key(&k) { None } else { foo(); m.insert(k, v) };
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
43 error: usage of `contains_key` followed by `insert` on a `BTreeMap`
44 --> $DIR/entry.rs:55:5
46 55 | if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
47 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
49 error: aborting due to 7 previous errors