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