rust/tests/ui/mut_key.stderr

29 lines
901 B
Text
Raw Normal View History

2019-12-06 19:45:33 +01:00
error: mutable key type
--> $DIR/mut_key.rs:29:32
2019-12-06 19:45:33 +01:00
|
LL | fn should_not_take_this_arg(m: &mut HashMap<Key, usize>, _n: usize) -> HashSet<Key> {
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[deny(clippy::mutable_key_type)]` on by default
error: mutable key type
--> $DIR/mut_key.rs:29:72
2019-12-06 19:45:33 +01:00
|
LL | fn should_not_take_this_arg(m: &mut HashMap<Key, usize>, _n: usize) -> HashSet<Key> {
| ^^^^^^^^^^^^
error: mutable key type
--> $DIR/mut_key.rs:30:5
2019-12-06 19:45:33 +01:00
|
LL | let _other: HashMap<Key, bool> = HashMap::new();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: mutable key type
--> $DIR/mut_key.rs:49:22
|
LL | fn tuples_bad<U>(_m: &mut HashMap<(Key, U), bool>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 4 previous errors
2019-12-06 19:45:33 +01:00