]> git.lizzy.rs Git - rust.git/blob - tests/ui/entry.stderr
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[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 LL | /     if !m.contains_key(&k) {
5 LL | |         m.insert(k, v);
6 LL | |     }
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 LL | /     if !m.contains_key(&k) {
15 LL | |         foo();
16 LL | |         m.insert(k, v);
17 LL | |     }
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 LL | /     if !m.contains_key(&k) {
24 LL | |         m.insert(k, v)
25 LL | |     } else {
26 LL | |         None
27 LL | |     };
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 LL | /     if m.contains_key(&k) {
34 LL | |         None
35 LL | |     } else {
36 LL | |         m.insert(k, v)
37 LL | |     };
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 LL | /     if !m.contains_key(&k) {
44 LL | |         foo();
45 LL | |         m.insert(k, v)
46 LL | |     } else {
47 LL | |         None
48 LL | |     };
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 LL | /     if m.contains_key(&k) {
55 LL | |         None
56 LL | |     } else {
57 LL | |         foo();
58 LL | |         m.insert(k, v)
59 LL | |     };
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 LL | /     if !m.contains_key(&k) {
66 LL | |         foo();
67 LL | |         m.insert(k, v)
68 LL | |     } else {
69 LL | |         None
70 LL | |     };
71    | |_____^ help: consider using: `m.entry(k)`
72
73 error: aborting due to 7 previous errors
74