]> git.lizzy.rs Git - rust.git/blob - tests/ui/entry.stderr
Update to `rustc 1.19.0-nightly (6a5fc9eec 2017-05-02)`
[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: lint level defined here
8   --> $DIR/entry.rs:5:9
9    |
10 5  | #![deny(map_entry)]
11    |         ^^^^^^^^^
12
13 error: usage of `contains_key` followed by `insert` on a `HashMap`
14   --> $DIR/entry.rs:20:5
15    |
16 20 |     if !m.contains_key(&k) { foo(); m.insert(k, v); }
17    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
18
19 error: usage of `contains_key` followed by `insert` on a `HashMap`
20   --> $DIR/entry.rs:27:5
21    |
22 27 |     if !m.contains_key(&k) { m.insert(k, v) } else { None };
23    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
24
25 error: usage of `contains_key` followed by `insert` on a `HashMap`
26   --> $DIR/entry.rs:34:5
27    |
28 34 |     if m.contains_key(&k) { None } else { m.insert(k, v) };
29    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
30
31 error: usage of `contains_key` followed by `insert` on a `HashMap`
32   --> $DIR/entry.rs:41:5
33    |
34 41 |     if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
35    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
36
37 error: usage of `contains_key` followed by `insert` on a `HashMap`
38   --> $DIR/entry.rs:48:5
39    |
40 48 |     if m.contains_key(&k) { None } else { foo(); m.insert(k, v) };
41    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
42
43 error: usage of `contains_key` followed by `insert` on a `BTreeMap`
44   --> $DIR/entry.rs:55:5
45    |
46 55 |     if !m.contains_key(&k) { foo(); m.insert(k, v) } else { None };
47    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `m.entry(k)`
48
49 error: aborting due to 7 previous errors
50