]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/mut_mut.stderr
Rollup merge of #84221 - ABouttefeux:generic-arg-elision, r=estebank
[rust.git] / src / tools / clippy / tests / ui / mut_mut.stderr
1 error: generally you want to avoid `&mut &mut _` if possible
2   --> $DIR/mut_mut.rs:4:11
3    |
4 LL | fn fun(x: &mut &mut u32) -> bool {
5    |           ^^^^^^^^^^^^^
6    |
7    = note: `-D clippy::mut-mut` implied by `-D warnings`
8
9 error: generally you want to avoid `&mut &mut _` if possible
10   --> $DIR/mut_mut.rs:20:17
11    |
12 LL |     let mut x = &mut &mut 1u32;
13    |                 ^^^^^^^^^^^^^^
14
15 error: generally you want to avoid `&mut &mut _` if possible
16   --> $DIR/mut_mut.rs:14:9
17    |
18 LL |         &mut $p
19    |         ^^^^^^^
20 ...
21 LL |     let mut z = mut_ptr!(&mut 3u32);
22    |                 ------------------- in this macro invocation
23    |
24    = note: this error originates in the macro `mut_ptr` (in Nightly builds, run with -Z macro-backtrace for more info)
25
26 error: this expression mutably borrows a mutable reference. Consider reborrowing
27   --> $DIR/mut_mut.rs:22:21
28    |
29 LL |         let mut y = &mut x;
30    |                     ^^^^^^
31
32 error: generally you want to avoid `&mut &mut _` if possible
33   --> $DIR/mut_mut.rs:26:32
34    |
35 LL |         let y: &mut &mut u32 = &mut &mut 2;
36    |                                ^^^^^^^^^^^
37
38 error: generally you want to avoid `&mut &mut _` if possible
39   --> $DIR/mut_mut.rs:26:16
40    |
41 LL |         let y: &mut &mut u32 = &mut &mut 2;
42    |                ^^^^^^^^^^^^^
43
44 error: generally you want to avoid `&mut &mut _` if possible
45   --> $DIR/mut_mut.rs:31:37
46    |
47 LL |         let y: &mut &mut &mut u32 = &mut &mut &mut 2;
48    |                                     ^^^^^^^^^^^^^^^^
49
50 error: generally you want to avoid `&mut &mut _` if possible
51   --> $DIR/mut_mut.rs:31:16
52    |
53 LL |         let y: &mut &mut &mut u32 = &mut &mut &mut 2;
54    |                ^^^^^^^^^^^^^^^^^^
55
56 error: generally you want to avoid `&mut &mut _` if possible
57   --> $DIR/mut_mut.rs:31:21
58    |
59 LL |         let y: &mut &mut &mut u32 = &mut &mut &mut 2;
60    |                     ^^^^^^^^^^^^^
61
62 error: aborting due to 9 previous errors
63