]> git.lizzy.rs Git - rust.git/blob - tests/ui/entry.stderr
Adapt the *.stderr files of the ui-tests to the tool_lints
[rust.git] / tests / ui / entry.stderr
1 error: usage of `contains_key` followed by `insert` on a `HashMap`
2   --> $DIR/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 clippy::map-entry` implied by `-D warnings`
8
9 error: usage of `contains_key` followed by `insert` on a `HashMap`
10   --> $DIR/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 error: usage of `contains_key` followed by `insert` on a `HashMap`
16   --> $DIR/entry.rs:21:5
17    |
18 21 |     if !m.contains_key(&k) { m.insert(k, v) } else { None };
19    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k)`
20
21 error: usage of `contains_key` followed by `insert` on a `HashMap`
22   --> $DIR/entry.rs:25:5
23    |
24 25 |     if m.contains_key(&k) { None } else { m.insert(k, v) };
25    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k)`
26
27 error: usage of `contains_key` followed by `insert` on a `HashMap`
28   --> $DIR/entry.rs:29:5
29    |
30 29 |     if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
31    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k)`
32
33 error: usage of `contains_key` followed by `insert` on a `HashMap`
34   --> $DIR/entry.rs:33:5
35    |
36 33 |     if m.contains_key(&k) { None } else { foo(); m.insert(k, v) };
37    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k)`
38
39 error: usage of `contains_key` followed by `insert` on a `BTreeMap`
40   --> $DIR/entry.rs:37:5
41    |
42 37 |     if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
43    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `m.entry(k)`
44
45 error: aborting due to 7 previous errors
46