mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-21 02:23:19 +00:00
112 lines
3.3 KiB
Text
112 lines
3.3 KiB
Text
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> examples/mut_mut.rs:10:12
|
|
|
|
|
10 | fn fun(x : &mut &mut u32) -> bool {
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D mut-mut` implied by `-D warnings`
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> examples/mut_mut.rs:24:17
|
|
|
|
|
24 | let mut x = &mut &mut 1u32;
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D mut-mut` implied by `-D warnings`
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> examples/mut_mut.rs:19:20
|
|
|
|
|
19 | ($p:expr) => { &mut $p }
|
|
| ^^^^^^^
|
|
...
|
|
39 | let mut z = mut_ptr!(&mut 3u32);
|
|
| ------------------- in this macro invocation
|
|
|
|
|
= note: `-D mut-mut` implied by `-D warnings`
|
|
|
|
error: this expression mutably borrows a mutable reference. Consider reborrowing
|
|
--> examples/mut_mut.rs:26:21
|
|
|
|
|
26 | let mut y = &mut x;
|
|
| ^^^^^^
|
|
|
|
|
= note: `-D mut-mut` implied by `-D warnings`
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> examples/mut_mut.rs:30:17
|
|
|
|
|
30 | let y : &mut &mut u32 = &mut &mut 2;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D mut-mut` implied by `-D warnings`
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> examples/mut_mut.rs:30:33
|
|
|
|
|
30 | let y : &mut &mut u32 = &mut &mut 2;
|
|
| ^^^^^^^^^^^
|
|
|
|
|
= note: `-D mut-mut` implied by `-D warnings`
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> examples/mut_mut.rs:30:17
|
|
|
|
|
30 | let y : &mut &mut u32 = &mut &mut 2;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D mut-mut` implied by `-D warnings`
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> examples/mut_mut.rs:35:17
|
|
|
|
|
35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D mut-mut` implied by `-D warnings`
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> examples/mut_mut.rs:35:22
|
|
|
|
|
35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D mut-mut` implied by `-D warnings`
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> examples/mut_mut.rs:35:38
|
|
|
|
|
35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D mut-mut` implied by `-D warnings`
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> examples/mut_mut.rs:35:17
|
|
|
|
|
35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D mut-mut` implied by `-D warnings`
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> examples/mut_mut.rs:35:22
|
|
|
|
|
35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D mut-mut` implied by `-D warnings`
|
|
|
|
error: generally you want to avoid `&mut &mut _` if possible
|
|
--> examples/mut_mut.rs:35:22
|
|
|
|
|
35 | let y : &mut &mut &mut u32 = &mut &mut &mut 2;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D mut-mut` implied by `-D warnings`
|
|
|
|
error: aborting due to 13 previous errors
|
|
|
|
error: Could not compile `clippy_tests`.
|
|
|
|
To learn more, run the command again with --verbose.
|