2017-02-07 14:05:30 -06:00
|
|
|
error: usage of `contains_key` followed by `insert` on a `HashMap`
|
|
|
|
--> $DIR/entry.rs:13:5
|
|
|
|
|
|
|
|
|
13 | if !m.contains_key(&k) { m.insert(k, v); }
|
2017-05-03 05:51:47 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k).or_insert(v)`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
--> $DIR/entry.rs:5:9
|
|
|
|
|
|
|
|
|
5 | #![deny(map_entry)]
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: usage of `contains_key` followed by `insert` on a `HashMap`
|
2017-05-11 06:03:39 -05:00
|
|
|
--> $DIR/entry.rs:17:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:03:39 -05:00
|
|
|
17 | if !m.contains_key(&k) { foo(); m.insert(k, v); }
|
2017-05-03 05:51:47 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: usage of `contains_key` followed by `insert` on a `HashMap`
|
2017-05-11 06:03:39 -05:00
|
|
|
--> $DIR/entry.rs:21:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:03:39 -05:00
|
|
|
21 | if !m.contains_key(&k) { m.insert(k, v) } else { None };
|
2017-05-03 05:51:47 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: usage of `contains_key` followed by `insert` on a `HashMap`
|
2017-05-11 06:03:39 -05:00
|
|
|
--> $DIR/entry.rs:25:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:03:39 -05:00
|
|
|
25 | if m.contains_key(&k) { None } else { m.insert(k, v) };
|
2017-05-03 05:51:47 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: usage of `contains_key` followed by `insert` on a `HashMap`
|
2017-05-11 06:03:39 -05:00
|
|
|
--> $DIR/entry.rs:29:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:03:39 -05:00
|
|
|
29 | if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
|
2017-05-03 05:51:47 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: usage of `contains_key` followed by `insert` on a `HashMap`
|
2017-05-11 06:03:39 -05:00
|
|
|
--> $DIR/entry.rs:33:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:03:39 -05:00
|
|
|
33 | if m.contains_key(&k) { None } else { foo(); m.insert(k, v) };
|
2017-05-03 05:51:47 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: usage of `contains_key` followed by `insert` on a `BTreeMap`
|
2017-05-11 06:03:39 -05:00
|
|
|
--> $DIR/entry.rs:37:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 06:03:39 -05:00
|
|
|
37 | if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
|
2017-05-03 05:51:47 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: aborting due to 7 previous errors
|
|
|
|
|