]> git.lizzy.rs Git - rust.git/blob - tests/ui/entry.stderr
Merge pull request #3285 from devonhollowood/pedantic-dogfood-items-after-statements
[rust.git] / tests / ui / entry.stderr
1 error: usage of `contains_key` followed by `insert` on a `HashMap`
2   --> $DIR/entry.rs:23:5
3    |
4 23 |     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:27:5
11    |
12 27 |     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:31:5
17    |
18 31 |     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:35:5
23    |
24 35 |     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:39:5
29    |
30 39 |     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:43:5
35    |
36 43 |     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:47:5
41    |
42 47 |     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