@@ -14,103 +14,94 @@ LL | fn should_not_take_this_arg(m: &mut HashMap<Key, usize>, _n: usize) -> Hash
1414 | ^^^^^^^^^^^^
1515
1616error: mutable key type
17- --> $DIR/mut_key.rs:37 :5
17+ --> $DIR/mut_key.rs:35 :5
1818 |
1919LL | let _other: HashMap<Key, bool> = HashMap::new();
2020 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2121
2222error: mutable key type
23- --> $DIR/mut_key.rs:65 :22
23+ --> $DIR/mut_key.rs:63 :22
2424 |
2525LL | fn tuples_bad<U>(_m: &mut HashMap<(Key, U), bool>) {}
2626 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2727
2828error: mutable key type
29- --> $DIR/mut_key.rs:78 :5
29+ --> $DIR/mut_key.rs:76 :5
3030 |
3131LL | let _map = HashMap::<Cell<usize>, usize>::new();
3232 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3333
3434error: mutable key type
35- --> $DIR/mut_key.rs:80 :5
35+ --> $DIR/mut_key.rs:78 :5
3636 |
3737LL | let _map = HashMap::<&mut Cell<usize>, usize>::new();
3838 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3939
4040error: mutable key type
41- --> $DIR/mut_key.rs:82 :5
41+ --> $DIR/mut_key.rs:80 :5
4242 |
4343LL | let _map = HashMap::<&mut usize, usize>::new();
4444 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4545
4646error: mutable key type
47- --> $DIR/mut_key.rs:85 :5
47+ --> $DIR/mut_key.rs:83 :5
4848 |
4949LL | let _map = HashMap::<Vec<Cell<usize>>, usize>::new();
5050 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5151
5252error: mutable key type
53- --> $DIR/mut_key.rs:87 :5
53+ --> $DIR/mut_key.rs:85 :5
5454 |
5555LL | let _map = HashMap::<BTreeMap<Cell<usize>, ()>, usize>::new();
5656 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5757
5858error: mutable key type
59- --> $DIR/mut_key.rs:89 :5
59+ --> $DIR/mut_key.rs:87 :5
6060 |
6161LL | let _map = HashMap::<BTreeMap<(), Cell<usize>>, usize>::new();
6262 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6363
6464error: mutable key type
65- --> $DIR/mut_key.rs:91 :5
65+ --> $DIR/mut_key.rs:89 :5
6666 |
6767LL | let _map = HashMap::<BTreeSet<Cell<usize>>, usize>::new();
6868 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6969
7070error: mutable key type
71- --> $DIR/mut_key.rs:93 :5
71+ --> $DIR/mut_key.rs:91 :5
7272 |
7373LL | let _map = HashMap::<Option<Cell<usize>>, usize>::new();
7474 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7575
7676error: mutable key type
77- --> $DIR/mut_key.rs:95 :5
77+ --> $DIR/mut_key.rs:93 :5
7878 |
7979LL | let _map = HashMap::<Option<Vec<Cell<usize>>>, usize>::new();
8080 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8181
8282error: mutable key type
83- --> $DIR/mut_key.rs:97 :5
83+ --> $DIR/mut_key.rs:95 :5
8484 |
8585LL | let _map = HashMap::<Result<&mut usize, ()>, usize>::new();
8686 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8787
8888error: mutable key type
89- --> $DIR/mut_key.rs:100 :5
89+ --> $DIR/mut_key.rs:98 :5
9090 |
9191LL | let _map = HashMap::<Box<Cell<usize>>, usize>::new();
9292 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9393
9494error: mutable key type
95- --> $DIR/mut_key.rs:102 :5
95+ --> $DIR/mut_key.rs:100 :5
9696 |
9797LL | let _map = HashMap::<Rc<Cell<usize>>, usize>::new();
9898 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9999
100100error: mutable key type
101- --> $DIR/mut_key.rs:104 :5
101+ --> $DIR/mut_key.rs:102 :5
102102 |
103103LL | let _map = HashMap::<Arc<Cell<usize>>, usize>::new();
104104 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
105105
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
116107
0 commit comments