mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
61 lines
1.8 KiB
Text
61 lines
1.8 KiB
Text
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> $DIR/mut_mut.rs:13:11
|
|
|
|
|
13 | fn fun(x: &mut &mut u32) -> bool {
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::mut-mut` implied by `-D warnings`
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> $DIR/mut_mut.rs:29:17
|
|
|
|
|
29 | let mut x = &mut &mut 1u32;
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> $DIR/mut_mut.rs:23:9
|
|
|
|
|
23 | &mut $p
|
|
| ^^^^^^^
|
|
...
|
|
44 | let mut z = mut_ptr!(&mut 3u32);
|
|
| ------------------- in this macro invocation
|
|
|
|
error: this expression mutably borrows a mutable reference. Consider reborrowing
|
|
--> $DIR/mut_mut.rs:31:21
|
|
|
|
|
31 | let mut y = &mut x;
|
|
| ^^^^^^
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> $DIR/mut_mut.rs:35:32
|
|
|
|
|
35 | let y: &mut &mut u32 = &mut &mut 2;
|
|
| ^^^^^^^^^^^
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> $DIR/mut_mut.rs:35:16
|
|
|
|
|
35 | let y: &mut &mut u32 = &mut &mut 2;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> $DIR/mut_mut.rs:40:37
|
|
|
|
|
40 | let y: &mut &mut &mut u32 = &mut &mut &mut 2;
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> $DIR/mut_mut.rs:40:16
|
|
|
|
|
40 | let y: &mut &mut &mut u32 = &mut &mut &mut 2;
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> $DIR/mut_mut.rs:40:21
|
|
|
|
|
40 | let y: &mut &mut &mut u32 = &mut &mut &mut 2;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 9 previous errors
|
|
|