]> git.lizzy.rs Git - rust.git/blob - clippy_tests/examples/entry.stderr
Fix the test suite after cargo update
[rust.git] / clippy_tests / examples / entry.stderr
1 error: usage of `contains_key` followed by `insert` on a `HashMap`
2   --> entry.rs:13:5
3    |
4 13 |     if !m.contains_key(&k) { m.insert(k, v); }
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k).or_insert(v)`
6    |
7    = note: `-D map-entry` implied by `-D warnings`
8
9 error: usage of `contains_key` followed by `insert` on a `HashMap`
10   --> entry.rs:17:5
11    |
12 17 |     if !m.contains_key(&k) { foo(); m.insert(k, v); }
13    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
14    |
15    = note: `-D map-entry` implied by `-D warnings`
16
17 error: usage of `contains_key` followed by `insert` on a `HashMap`
18   --> entry.rs:21:5
19    |
20 21 |     if !m.contains_key(&k) { m.insert(k, v) } else { None };
21    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
22    |
23    = note: `-D map-entry` implied by `-D warnings`
24
25 error: usage of `contains_key` followed by `insert` on a `HashMap`
26   --> entry.rs:25:5
27    |
28 25 |     if m.contains_key(&k) { None } else { m.insert(k, v) };
29    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
30    |
31    = note: `-D map-entry` implied by `-D warnings`
32
33 error: usage of `contains_key` followed by `insert` on a `HashMap`
34   --> entry.rs:29:5
35    |
36 29 |     if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
37    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
38    |
39    = note: `-D map-entry` implied by `-D warnings`
40
41 error: usage of `contains_key` followed by `insert` on a `HashMap`
42   --> entry.rs:33:5
43    |
44 33 |     if m.contains_key(&k) { None } else { foo(); m.insert(k, v) };
45    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
46    |
47    = note: `-D map-entry` implied by `-D warnings`
48
49 error: usage of `contains_key` followed by `insert` on a `BTreeMap`
50   --> entry.rs:37:5
51    |
52 37 |     if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
53    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
54    |
55    = note: `-D map-entry` implied by `-D warnings`
56
57 error: aborting due to previous error(s)
58
59
60 To learn more, run the command again with --verbose.