mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
89 lines
2.6 KiB
Text
89 lines
2.6 KiB
Text
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> $DIR/mut_mut.rs:10:12
|
|
|
|
|
10 | fn fun(x : &mut &mut u32) -> bool {
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
note: lint level defined here
|
|
--> $DIR/mut_mut.rs:5:9
|
|
|
|
|
5 | #![deny(mut_mut)]
|
|
| ^^^^^^^
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> $DIR/mut_mut.rs:25:17
|
|
|
|
|
25 | let mut x = &mut &mut 1u32;
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> $DIR/mut_mut.rs:19:20
|
|
|
|
|
19 | ($p:expr) => { &mut $p }
|
|
| ^^^^^^^
|
|
...
|
|
49 | 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:27:21
|
|
|
|
|
27 | let mut y = &mut x;
|
|
| ^^^^^^
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> $DIR/mut_mut.rs:31:17
|
|
|
|
|
31 | let y : &mut &mut u32 = &mut &mut 2;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> $DIR/mut_mut.rs:31:33
|
|
|
|
|
31 | let y : &mut &mut u32 = &mut &mut 2;
|
|
| ^^^^^^^^^^^
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> $DIR/mut_mut.rs:31:17
|
|
|
|
|
31 | let y : &mut &mut u32 = &mut &mut 2;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> $DIR/mut_mut.rs:39:17
|
|
|
|
|
39 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> $DIR/mut_mut.rs:39:22
|
|
|
|
|
39 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> $DIR/mut_mut.rs:39:38
|
|
|
|
|
39 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> $DIR/mut_mut.rs:39:17
|
|
|
|
|
39 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> $DIR/mut_mut.rs:39:22
|
|
|
|
|
39 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> $DIR/mut_mut.rs:39:22
|
|
|
|
|
39 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 13 previous errors
|
|
|