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