rust-clippy/tests/ui/mut_mut.stderr

62 lines
1.8 KiB
Text
Raw Normal View History

error: generally you want to avoid `&mut &mut _` if possible
2018-12-10 05:27:19 +00:00
--> $DIR/mut_mut.rs:13:11
|
2018-12-27 15:57:55 +00:00
LL | fn fun(x: &mut &mut u32) -> bool {
2018-12-10 05:27:19 +00:00
| ^^^^^^^^^^^^^
|
= note: `-D clippy::mut-mut` implied by `-D warnings`
error: generally you want to avoid `&mut &mut _` if possible
2018-12-10 05:27:19 +00:00
--> $DIR/mut_mut.rs:29:17
|
2018-12-27 15:57:55 +00:00
LL | let mut x = &mut &mut 1u32;
| ^^^^^^^^^^^^^^
error: generally you want to avoid `&mut &mut _` if possible
2018-12-10 05:27:19 +00:00
--> $DIR/mut_mut.rs:23:9
|
2018-12-27 15:57:55 +00:00
LL | &mut $p
2018-12-10 05:27:19 +00:00
| ^^^^^^^
...
2018-12-27 15:57:55 +00:00
LL | let mut z = mut_ptr!(&mut 3u32);
| ------------------- in this macro invocation
error: this expression mutably borrows a mutable reference. Consider reborrowing
2018-12-10 05:27:19 +00:00
--> $DIR/mut_mut.rs:31:21
|
2018-12-27 15:57:55 +00:00
LL | let mut y = &mut x;
| ^^^^^^
error: generally you want to avoid `&mut &mut _` if possible
2018-12-10 05:27:19 +00:00
--> $DIR/mut_mut.rs:35:32
|
2018-12-27 15:57:55 +00:00
LL | let y: &mut &mut u32 = &mut &mut 2;
2018-12-10 05:27:19 +00:00
| ^^^^^^^^^^^
error: generally you want to avoid `&mut &mut _` if possible
2018-12-10 05:27:19 +00:00
--> $DIR/mut_mut.rs:35:16
|
2018-12-27 15:57:55 +00:00
LL | let y: &mut &mut u32 = &mut &mut 2;
2018-12-10 05:27:19 +00:00
| ^^^^^^^^^^^^^
error: generally you want to avoid `&mut &mut _` if possible
2018-12-10 05:27:19 +00:00
--> $DIR/mut_mut.rs:40:37
|
2018-12-27 15:57:55 +00:00
LL | let y: &mut &mut &mut u32 = &mut &mut &mut 2;
2018-12-10 05:27:19 +00:00
| ^^^^^^^^^^^^^^^^
error: generally you want to avoid `&mut &mut _` if possible
2018-12-10 05:27:19 +00:00
--> $DIR/mut_mut.rs:40:16
|
2018-12-27 15:57:55 +00:00
LL | let y: &mut &mut &mut u32 = &mut &mut &mut 2;
2018-12-10 05:27:19 +00:00
| ^^^^^^^^^^^^^^^^^^
error: generally you want to avoid `&mut &mut _` if possible
2018-12-10 05:27:19 +00:00
--> $DIR/mut_mut.rs:40:21
|
2018-12-27 15:57:55 +00:00
LL | let y: &mut &mut &mut u32 = &mut &mut &mut 2;
2018-12-10 05:27:19 +00:00
| ^^^^^^^^^^^^^
2018-01-16 16:06:27 +00:00
error: aborting due to 9 previous errors