2019-12-06 12:45:33 -06:00
|
|
|
error: mutable key type
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/mut_key.rs:31:32
|
2019-12-06 12:45:33 -06:00
|
|
|
|
|
|
|
|
LL | fn should_not_take_this_arg(m: &mut HashMap<Key, usize>, _n: usize) -> HashSet<Key> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2024-10-03 14:29:36 -05:00
|
|
|
= note: ... because it contains `Key`, which has interior mutability
|
|
|
|
= note: ... because it contains `AtomicUsize`, which has interior mutability
|
|
|
|
= note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
|
2021-07-01 11:17:38 -05:00
|
|
|
= note: `-D clippy::mutable-key-type` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::mutable_key_type)]`
|
2019-12-06 12:45:33 -06:00
|
|
|
|
|
|
|
error: mutable key type
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/mut_key.rs:31:72
|
2019-12-06 12:45:33 -06:00
|
|
|
|
|
|
|
|
LL | fn should_not_take_this_arg(m: &mut HashMap<Key, usize>, _n: usize) -> HashSet<Key> {
|
|
|
|
| ^^^^^^^^^^^^
|
2024-10-03 14:29:36 -05:00
|
|
|
|
|
|
|
|
= note: ... because it contains `Key`, which has interior mutability
|
|
|
|
= note: ... because it contains `AtomicUsize`, which has interior mutability
|
|
|
|
= note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
|
2019-12-06 12:45:33 -06:00
|
|
|
|
|
|
|
error: mutable key type
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/mut_key.rs:35:5
|
2019-12-06 12:45:33 -06:00
|
|
|
|
|
|
|
|
LL | let _other: HashMap<Key, bool> = HashMap::new();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2024-10-03 14:29:36 -05:00
|
|
|
|
|
|
|
|
= note: ... because it contains `Key`, which has interior mutability
|
|
|
|
= note: ... because it contains `AtomicUsize`, which has interior mutability
|
|
|
|
= note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
|
2019-12-06 12:45:33 -06:00
|
|
|
|
2020-01-16 17:18:37 -06:00
|
|
|
error: mutable key type
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/mut_key.rs:63:22
|
2020-01-16 17:18:37 -06:00
|
|
|
|
|
|
|
|
LL | fn tuples_bad<U>(_m: &mut HashMap<(Key, U), bool>) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2024-10-03 14:29:36 -05:00
|
|
|
|
|
|
|
|
= note: ... because it contains `(Key, U)`, which has interior mutability
|
|
|
|
= note: ... because it contains `Key`, which has interior mutability
|
|
|
|
= note: ... because it contains `AtomicUsize`, which has interior mutability
|
|
|
|
= note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
|
2020-01-16 17:18:37 -06:00
|
|
|
|
2021-09-28 12:03:12 -05:00
|
|
|
error: mutable key type
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/mut_key.rs:76:5
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
|
LL | let _map = HashMap::<Cell<usize>, usize>::new();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2024-10-03 14:29:36 -05:00
|
|
|
|
|
|
|
|
= note: ... because it contains `Cell<usize>`, which has interior mutability
|
|
|
|
= note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
error: mutable key type
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/mut_key.rs:78:5
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
|
LL | let _map = HashMap::<&mut Cell<usize>, usize>::new();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2024-10-03 14:29:36 -05:00
|
|
|
|
|
|
|
|
= note: ... because it contains `&mut Cell<usize>`, which has interior mutability
|
|
|
|
= note: ... because it contains `Cell<usize>`, which has interior mutability
|
|
|
|
= note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
error: mutable key type
|
2024-04-18 12:05:07 -05:00
|
|
|
--> tests/ui/mut_key.rs:81:5
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
|
LL | let _map = HashMap::<Vec<Cell<usize>>, usize>::new();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2024-10-03 14:29:36 -05:00
|
|
|
|
|
|
|
|
= note: ... because it contains `Vec<Cell<usize>>`, which has interior mutability
|
|
|
|
= note: ... because it contains `Cell<usize>`, which has interior mutability
|
|
|
|
= note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
error: mutable key type
|
2024-04-18 12:05:07 -05:00
|
|
|
--> tests/ui/mut_key.rs:83:5
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
|
LL | let _map = HashMap::<BTreeMap<Cell<usize>, ()>, usize>::new();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2024-10-03 14:29:36 -05:00
|
|
|
|
|
|
|
|
= note: ... because it contains `BTreeMap<Cell<usize>, ()>`, which has interior mutability
|
|
|
|
= note: ... because it contains `Cell<usize>`, which has interior mutability
|
|
|
|
= note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
error: mutable key type
|
2024-04-18 12:05:07 -05:00
|
|
|
--> tests/ui/mut_key.rs:85:5
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
|
LL | let _map = HashMap::<BTreeMap<(), Cell<usize>>, usize>::new();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2024-10-03 14:29:36 -05:00
|
|
|
|
|
|
|
|
= note: ... because it contains `BTreeMap<(), Cell<usize>>`, which has interior mutability
|
|
|
|
= note: ... because it contains `Cell<usize>`, which has interior mutability
|
|
|
|
= note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
error: mutable key type
|
2024-04-18 12:05:07 -05:00
|
|
|
--> tests/ui/mut_key.rs:87:5
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
|
LL | let _map = HashMap::<BTreeSet<Cell<usize>>, usize>::new();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2024-10-03 14:29:36 -05:00
|
|
|
|
|
|
|
|
= note: ... because it contains `BTreeSet<Cell<usize>>`, which has interior mutability
|
|
|
|
= note: ... because it contains `Cell<usize>`, which has interior mutability
|
|
|
|
= note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
error: mutable key type
|
2024-04-18 12:05:07 -05:00
|
|
|
--> tests/ui/mut_key.rs:89:5
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
|
LL | let _map = HashMap::<Option<Cell<usize>>, usize>::new();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2024-10-03 14:29:36 -05:00
|
|
|
|
|
|
|
|
= note: ... because it contains `Option<Cell<usize>>`, which has interior mutability
|
|
|
|
= note: ... because it contains `Cell<usize>`, which has interior mutability
|
|
|
|
= note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
error: mutable key type
|
2024-04-18 12:05:07 -05:00
|
|
|
--> tests/ui/mut_key.rs:91:5
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
|
LL | let _map = HashMap::<Option<Vec<Cell<usize>>>, usize>::new();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2024-10-03 14:29:36 -05:00
|
|
|
|
|
|
|
|
= note: ... because it contains `Option<Vec<Cell<usize>>>`, which has interior mutability
|
|
|
|
= note: ... because it contains `Vec<Cell<usize>>`, which has interior mutability
|
|
|
|
= note: ... because it contains `Cell<usize>`, which has interior mutability
|
|
|
|
= note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
error: mutable key type
|
2024-04-18 12:05:07 -05:00
|
|
|
--> tests/ui/mut_key.rs:94:5
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
|
LL | let _map = HashMap::<Box<Cell<usize>>, usize>::new();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2024-10-03 14:29:36 -05:00
|
|
|
|
|
|
|
|
= note: ... because it contains `Box<Cell<usize>>`, which has interior mutability
|
|
|
|
= note: ... because it contains `Cell<usize>`, which has interior mutability
|
|
|
|
= note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
error: mutable key type
|
2024-04-18 12:05:07 -05:00
|
|
|
--> tests/ui/mut_key.rs:96:5
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
|
LL | let _map = HashMap::<Rc<Cell<usize>>, usize>::new();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2024-10-03 14:29:36 -05:00
|
|
|
|
|
|
|
|
= note: ... because it contains `Rc<Cell<usize>>`, which has interior mutability
|
|
|
|
= note: ... because it contains `Cell<usize>`, which has interior mutability
|
|
|
|
= note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
error: mutable key type
|
2024-04-18 12:05:07 -05:00
|
|
|
--> tests/ui/mut_key.rs:98:5
|
2021-09-28 12:03:12 -05:00
|
|
|
|
|
|
|
|
LL | let _map = HashMap::<Arc<Cell<usize>>, usize>::new();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2024-10-03 14:29:36 -05:00
|
|
|
|
|
|
|
|
= note: ... because it contains `Arc<Cell<usize>>`, which has interior mutability
|
|
|
|
= note: ... because it contains `Cell<usize>`, which has interior mutability
|
|
|
|
= note: ... because it contains `UnsafeCell<usize>`, which has interior mutability
|
2021-09-28 12:03:12 -05:00
|
|
|
|
2024-04-18 12:05:07 -05:00
|
|
|
error: aborting due to 15 previous errors
|
2019-12-06 12:45:33 -06:00
|
|
|
|