]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/mut_key.stderr
New upstream version 1.74.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / mut_key.stderr
1 error: mutable key type
2 --> $DIR/mut_key.rs:31:32
3 |
4 LL | fn should_not_take_this_arg(m: &mut HashMap<Key, usize>, _n: usize) -> HashSet<Key> {
5 | ^^^^^^^^^^^^^^^^^^^^^^^^
6 |
7 = note: `-D clippy::mutable-key-type` implied by `-D warnings`
8 = help: to override `-D warnings` add `#[allow(clippy::mutable_key_type)]`
9
10 error: mutable key type
11 --> $DIR/mut_key.rs:31:72
12 |
13 LL | fn should_not_take_this_arg(m: &mut HashMap<Key, usize>, _n: usize) -> HashSet<Key> {
14 | ^^^^^^^^^^^^
15
16 error: mutable key type
17 --> $DIR/mut_key.rs:35:5
18 |
19 LL | let _other: HashMap<Key, bool> = HashMap::new();
20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21
22 error: mutable key type
23 --> $DIR/mut_key.rs:63:22
24 |
25 LL | fn tuples_bad<U>(_m: &mut HashMap<(Key, U), bool>) {}
26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27
28 error: mutable key type
29 --> $DIR/mut_key.rs:76:5
30 |
31 LL | let _map = HashMap::<Cell<usize>, usize>::new();
32 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33
34 error: mutable key type
35 --> $DIR/mut_key.rs:78:5
36 |
37 LL | let _map = HashMap::<&mut Cell<usize>, usize>::new();
38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39
40 error: mutable key type
41 --> $DIR/mut_key.rs:80:5
42 |
43 LL | let _map = HashMap::<&mut usize, usize>::new();
44 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45
46 error: mutable key type
47 --> $DIR/mut_key.rs:83:5
48 |
49 LL | let _map = HashMap::<Vec<Cell<usize>>, usize>::new();
50 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
51
52 error: mutable key type
53 --> $DIR/mut_key.rs:85:5
54 |
55 LL | let _map = HashMap::<BTreeMap<Cell<usize>, ()>, usize>::new();
56 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
57
58 error: mutable key type
59 --> $DIR/mut_key.rs:87:5
60 |
61 LL | let _map = HashMap::<BTreeMap<(), Cell<usize>>, usize>::new();
62 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
63
64 error: mutable key type
65 --> $DIR/mut_key.rs:89:5
66 |
67 LL | let _map = HashMap::<BTreeSet<Cell<usize>>, usize>::new();
68 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
69
70 error: mutable key type
71 --> $DIR/mut_key.rs:91:5
72 |
73 LL | let _map = HashMap::<Option<Cell<usize>>, usize>::new();
74 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
75
76 error: mutable key type
77 --> $DIR/mut_key.rs:93:5
78 |
79 LL | let _map = HashMap::<Option<Vec<Cell<usize>>>, usize>::new();
80 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
81
82 error: mutable key type
83 --> $DIR/mut_key.rs:95:5
84 |
85 LL | let _map = HashMap::<Result<&mut usize, ()>, usize>::new();
86 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
87
88 error: mutable key type
89 --> $DIR/mut_key.rs:98:5
90 |
91 LL | let _map = HashMap::<Box<Cell<usize>>, usize>::new();
92 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
93
94 error: mutable key type
95 --> $DIR/mut_key.rs:100:5
96 |
97 LL | let _map = HashMap::<Rc<Cell<usize>>, usize>::new();
98 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
99
100 error: mutable key type
101 --> $DIR/mut_key.rs:102:5
102 |
103 LL | let _map = HashMap::<Arc<Cell<usize>>, usize>::new();
104 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
105
106 error: aborting due to 17 previous errors
107