|
1 | 1 | error: mutable key type
|
2 |
| - --> $DIR/mut_key.rs:31:32 |
| 2 | + --> $DIR/mut_key.rs:33:32 |
3 | 3 | |
|
4 | 4 | LL | fn should_not_take_this_arg(m: &mut HashMap<Key, usize>, _n: usize) -> HashSet<Key> {
|
5 | 5 | | ^^^^^^^^^^^^^^^^^^^^^^^^
|
6 | 6 | |
|
7 | 7 | = note: `-D clippy::mutable-key-type` implied by `-D warnings`
|
8 | 8 |
|
9 | 9 | error: mutable key type
|
10 |
| - --> $DIR/mut_key.rs:31:72 |
| 10 | + --> $DIR/mut_key.rs:33:72 |
11 | 11 | |
|
12 | 12 | LL | fn should_not_take_this_arg(m: &mut HashMap<Key, usize>, _n: usize) -> HashSet<Key> {
|
13 | 13 | | ^^^^^^^^^^^^
|
14 | 14 |
|
15 |
| -error: this argument is a mutable reference, but not used mutably |
16 |
| - --> $DIR/mut_key.rs:31:32 |
17 |
| - | |
18 |
| -LL | fn should_not_take_this_arg(m: &mut HashMap<Key, usize>, _n: usize) -> HashSet<Key> { |
19 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&HashMap<Key, usize>` |
20 |
| - | |
21 |
| - = note: `-D clippy::needless-pass-by-ref-mut` implied by `-D warnings` |
22 |
| - |
23 | 15 | error: mutable key type
|
24 |
| - --> $DIR/mut_key.rs:32:5 |
| 16 | + --> $DIR/mut_key.rs:34:5 |
25 | 17 | |
|
26 | 18 | LL | let _other: HashMap<Key, bool> = HashMap::new();
|
27 | 19 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
28 | 20 |
|
29 | 21 | error: mutable key type
|
30 |
| - --> $DIR/mut_key.rs:59:22 |
| 22 | + --> $DIR/mut_key.rs:61:22 |
31 | 23 | |
|
32 | 24 | LL | fn tuples_bad<U>(_m: &mut HashMap<(Key, U), bool>) {}
|
33 | 25 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
34 | 26 |
|
35 | 27 | error: mutable key type
|
36 |
| - --> $DIR/mut_key.rs:71:5 |
| 28 | + --> $DIR/mut_key.rs:73:5 |
37 | 29 | |
|
38 | 30 | LL | let _map = HashMap::<Cell<usize>, usize>::new();
|
39 | 31 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
40 | 32 |
|
41 | 33 | error: mutable key type
|
42 |
| - --> $DIR/mut_key.rs:72:5 |
| 34 | + --> $DIR/mut_key.rs:74:5 |
43 | 35 | |
|
44 | 36 | LL | let _map = HashMap::<&mut Cell<usize>, usize>::new();
|
45 | 37 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
46 | 38 |
|
47 | 39 | error: mutable key type
|
48 |
| - --> $DIR/mut_key.rs:73:5 |
| 40 | + --> $DIR/mut_key.rs:75:5 |
49 | 41 | |
|
50 | 42 | LL | let _map = HashMap::<&mut usize, usize>::new();
|
51 | 43 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52 | 44 |
|
53 | 45 | error: mutable key type
|
54 |
| - --> $DIR/mut_key.rs:75:5 |
| 46 | + --> $DIR/mut_key.rs:77:5 |
55 | 47 | |
|
56 | 48 | LL | let _map = HashMap::<Vec<Cell<usize>>, usize>::new();
|
57 | 49 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
58 | 50 |
|
59 | 51 | error: mutable key type
|
60 |
| - --> $DIR/mut_key.rs:76:5 |
| 52 | + --> $DIR/mut_key.rs:78:5 |
61 | 53 | |
|
62 | 54 | LL | let _map = HashMap::<BTreeMap<Cell<usize>, ()>, usize>::new();
|
63 | 55 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
64 | 56 |
|
65 | 57 | error: mutable key type
|
66 |
| - --> $DIR/mut_key.rs:77:5 |
| 58 | + --> $DIR/mut_key.rs:79:5 |
67 | 59 | |
|
68 | 60 | LL | let _map = HashMap::<BTreeMap<(), Cell<usize>>, usize>::new();
|
69 | 61 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
70 | 62 |
|
71 | 63 | error: mutable key type
|
72 |
| - --> $DIR/mut_key.rs:78:5 |
| 64 | + --> $DIR/mut_key.rs:80:5 |
73 | 65 | |
|
74 | 66 | LL | let _map = HashMap::<BTreeSet<Cell<usize>>, usize>::new();
|
75 | 67 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
76 | 68 |
|
77 | 69 | error: mutable key type
|
78 |
| - --> $DIR/mut_key.rs:79:5 |
| 70 | + --> $DIR/mut_key.rs:81:5 |
79 | 71 | |
|
80 | 72 | LL | let _map = HashMap::<Option<Cell<usize>>, usize>::new();
|
81 | 73 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
82 | 74 |
|
83 | 75 | error: mutable key type
|
84 |
| - --> $DIR/mut_key.rs:80:5 |
| 76 | + --> $DIR/mut_key.rs:82:5 |
85 | 77 | |
|
86 | 78 | LL | let _map = HashMap::<Option<Vec<Cell<usize>>>, usize>::new();
|
87 | 79 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
88 | 80 |
|
89 | 81 | error: mutable key type
|
90 |
| - --> $DIR/mut_key.rs:81:5 |
| 82 | + --> $DIR/mut_key.rs:83:5 |
91 | 83 | |
|
92 | 84 | LL | let _map = HashMap::<Result<&mut usize, ()>, usize>::new();
|
93 | 85 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
94 | 86 |
|
95 | 87 | error: mutable key type
|
96 |
| - --> $DIR/mut_key.rs:83:5 |
| 88 | + --> $DIR/mut_key.rs:85:5 |
97 | 89 | |
|
98 | 90 | LL | let _map = HashMap::<Box<Cell<usize>>, usize>::new();
|
99 | 91 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
100 | 92 |
|
101 | 93 | error: mutable key type
|
102 |
| - --> $DIR/mut_key.rs:84:5 |
| 94 | + --> $DIR/mut_key.rs:86:5 |
103 | 95 | |
|
104 | 96 | LL | let _map = HashMap::<Rc<Cell<usize>>, usize>::new();
|
105 | 97 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
106 | 98 |
|
107 | 99 | error: mutable key type
|
108 |
| - --> $DIR/mut_key.rs:85:5 |
| 100 | + --> $DIR/mut_key.rs:87:5 |
109 | 101 | |
|
110 | 102 | LL | let _map = HashMap::<Arc<Cell<usize>>, usize>::new();
|
111 | 103 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
112 | 104 |
|
113 |
| -error: aborting due to 18 previous errors |
| 105 | +error: aborting due to 17 previous errors |
114 | 106 |
|
0 commit comments