rust/tests/ui/mut_mut.stderr

90 lines
2.6 KiB
Plaintext
Raw Normal View History

error: generally you want to avoid `&mut &mut _` if possible
--> $DIR/mut_mut.rs:10:12
|
2017-02-08 14:58:07 +01:00
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
|
2017-02-08 14:58:07 +01:00
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
|
2017-02-08 14:58:07 +01:00
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