rust/tests/ui/entry.stderr

47 lines
1.9 KiB
Text
Raw Normal View History

error: usage of `contains_key` followed by `insert` on a `HashMap`
2018-10-06 18:18:06 +02:00
--> $DIR/entry.rs:23:5
|
2018-10-06 18:18:06 +02:00
23 | if !m.contains_key(&k) { m.insert(k, v); }
2017-07-21 10:40:23 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k).or_insert(v)`
|
= note: `-D clippy::map-entry` implied by `-D warnings`
error: usage of `contains_key` followed by `insert` on a `HashMap`
2018-10-06 18:18:06 +02:00
--> $DIR/entry.rs:27:5
|
2018-10-06 18:18:06 +02:00
27 | if !m.contains_key(&k) { foo(); m.insert(k, v); }
2017-07-21 10:40:23 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k)`
error: usage of `contains_key` followed by `insert` on a `HashMap`
2018-10-06 18:18:06 +02:00
--> $DIR/entry.rs:31:5
|
2018-10-06 18:18:06 +02:00
31 | if !m.contains_key(&k) { m.insert(k, v) } else { None };
2017-07-21 10:40:23 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k)`
error: usage of `contains_key` followed by `insert` on a `HashMap`
2018-10-06 18:18:06 +02:00
--> $DIR/entry.rs:35:5
|
2018-10-06 18:18:06 +02:00
35 | if m.contains_key(&k) { None } else { m.insert(k, v) };
2017-07-21 10:40:23 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k)`
error: usage of `contains_key` followed by `insert` on a `HashMap`
2018-10-06 18:18:06 +02:00
--> $DIR/entry.rs:39:5
|
2018-10-06 18:18:06 +02:00
39 | if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
2017-07-21 10:40:23 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k)`
error: usage of `contains_key` followed by `insert` on a `HashMap`
2018-10-06 18:18:06 +02:00
--> $DIR/entry.rs:43:5
|
2018-10-06 18:18:06 +02:00
43 | if m.contains_key(&k) { None } else { foo(); m.insert(k, v) };
2017-07-21 10:40:23 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k)`
error: usage of `contains_key` followed by `insert` on a `BTreeMap`
2018-10-06 18:18:06 +02:00
--> $DIR/entry.rs:47:5
|
2018-10-06 18:18:06 +02:00
47 | if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
2017-07-21 10:40:23 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k)`
2018-01-16 17:06:27 +01:00
error: aborting due to 7 previous errors