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