90 lines
2.8 KiB
Plaintext
90 lines
2.8 KiB
Plaintext
|
error: generally you want to avoid `&mut &mut _` if possible
|
||
|
--> $DIR/mut_mut.rs:10:12
|
||
|
|
|
||
|
10 | fn fun(x : &mut &mut u32) -> bool { //~ERROR generally you want to avoid `&mut &mut
|
||
|
| ^^^^^^^^^^^^^
|
||
|
|
|
||
|
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
|
||
|
| ^^^^^^^^^^^^^^
|
||
|
|
||
|
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 this expression mutably borrows a mutable reference
|
||
|
| ^^^^^^
|
||
|
|
||
|
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
|
||
|
|