2017-02-07 14:05:30 -06:00
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
|
|
--> $DIR/mut_mut.rs:10:12
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
10 | fn fun(x : &mut &mut u32) -> bool {
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
25 | let mut x = &mut &mut 1u32;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2017-02-08 07:58:07 -06:00
|
|
|
27 | let mut y = &mut x;
|
2017-02-07 14:05:30 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
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
|
|
|
|
|