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:17:5
16 17 | 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:21:5
22 21 | 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:25:5
28 25 | 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:29:5
34 29 | 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:33:5
40 33 | 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:37:5
46 37 | 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