]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/entry_unfixable.stderr
Merge branch 'master' into hooks
[rust.git] / src / tools / clippy / tests / ui / entry_unfixable.stderr
1 error: usage of `contains_key` followed by `insert` on a `HashMap`
2   --> $DIR/entry_unfixable.rs:10:5
3    |
4 LL | /     if !m.contains_key(&k) {
5 LL | |         m.insert(k, v)
6 LL | |     } else {
7 LL | |         None
8 LL | |     };
9    | |_____^ consider using `m.entry(k)`
10    |
11    = note: `-D clippy::map-entry` implied by `-D warnings`
12
13 error: usage of `contains_key` followed by `insert` on a `HashMap`
14   --> $DIR/entry_unfixable.rs:18:5
15    |
16 LL | /     if m.contains_key(&k) {
17 LL | |         None
18 LL | |     } else {
19 LL | |         m.insert(k, v)
20 LL | |     };
21    | |_____^ consider using `m.entry(k)`
22
23 error: usage of `contains_key` followed by `insert` on a `HashMap`
24   --> $DIR/entry_unfixable.rs:26:5
25    |
26 LL | /     if !m.contains_key(&k) {
27 LL | |         foo();
28 LL | |         m.insert(k, v)
29 LL | |     } else {
30 LL | |         None
31 LL | |     };
32    | |_____^ consider using `m.entry(k)`
33
34 error: usage of `contains_key` followed by `insert` on a `HashMap`
35   --> $DIR/entry_unfixable.rs:35:5
36    |
37 LL | /     if m.contains_key(&k) {
38 LL | |         None
39 LL | |     } else {
40 LL | |         foo();
41 LL | |         m.insert(k, v)
42 LL | |     };
43    | |_____^ consider using `m.entry(k)`
44
45 error: usage of `contains_key` followed by `insert` on a `BTreeMap`
46   --> $DIR/entry_unfixable.rs:44:5
47    |
48 LL | /     if !m.contains_key(&k) {
49 LL | |         foo();
50 LL | |         m.insert(k, v)
51 LL | |     } else {
52 LL | |         None
53 LL | |     };
54    | |_____^ consider using `m.entry(k)`
55
56 error: aborting due to 5 previous errors
57