rust-clippy/tests/ui/mut_mut.stderr
2018-10-06 09:43:08 -07:00

61 lines
1.8 KiB
Text

error: generally you want to avoid `&mut &mut _` if possible
--> $DIR/mut_mut.rs:20:12
|
20 | 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:34:17
|
34 | let mut x = &mut &mut 1u32;
| ^^^^^^^^^^^^^^
error: generally you want to avoid `&mut &mut _` if possible
--> $DIR/mut_mut.rs:29:20
|
29 | ($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:36:21
|
36 | let mut y = &mut x;
| ^^^^^^
error: generally you want to avoid `&mut &mut _` if possible
--> $DIR/mut_mut.rs:40:33
|
40 | let y : &mut &mut u32 = &mut &mut 2;
| ^^^^^^^^^^^
error: generally you want to avoid `&mut &mut _` if possible
--> $DIR/mut_mut.rs:40:17
|
40 | let y : &mut &mut u32 = &mut &mut 2;
| ^^^^^^^^^^^^^
error: generally you want to avoid `&mut &mut _` if possible
--> $DIR/mut_mut.rs:45:38
|
45 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
| ^^^^^^^^^^^^^^^^
error: generally you want to avoid `&mut &mut _` if possible
--> $DIR/mut_mut.rs:45:17
|
45 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
| ^^^^^^^^^^^^^^^^^^
error: generally you want to avoid `&mut &mut _` if possible
--> $DIR/mut_mut.rs:45:22
|
45 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
| ^^^^^^^^^^^^^
error: aborting due to 9 previous errors