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