]> git.lizzy.rs Git - rust.git/blob - tests/ui/mut_mut.stderr
Merge branch 'master' into add-lints-aseert-checks
[rust.git] / 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 error: this expression mutably borrows a mutable reference. Consider reborrowing
25   --> $DIR/mut_mut.rs:22:21
26    |
27 LL |         let mut y = &mut x;
28    |                     ^^^^^^
29
30 error: generally you want to avoid `&mut &mut _` if possible
31   --> $DIR/mut_mut.rs:26:32
32    |
33 LL |         let y: &mut &mut u32 = &mut &mut 2;
34    |                                ^^^^^^^^^^^
35
36 error: generally you want to avoid `&mut &mut _` if possible
37   --> $DIR/mut_mut.rs:26:16
38    |
39 LL |         let y: &mut &mut u32 = &mut &mut 2;
40    |                ^^^^^^^^^^^^^
41
42 error: generally you want to avoid `&mut &mut _` if possible
43   --> $DIR/mut_mut.rs:31:37
44    |
45 LL |         let y: &mut &mut &mut u32 = &mut &mut &mut 2;
46    |                                     ^^^^^^^^^^^^^^^^
47
48 error: generally you want to avoid `&mut &mut _` if possible
49   --> $DIR/mut_mut.rs:31:16
50    |
51 LL |         let y: &mut &mut &mut u32 = &mut &mut &mut 2;
52    |                ^^^^^^^^^^^^^^^^^^
53
54 error: generally you want to avoid `&mut &mut _` if possible
55   --> $DIR/mut_mut.rs:31:21
56    |
57 LL |         let y: &mut &mut &mut u32 = &mut &mut &mut 2;
58    |                     ^^^^^^^^^^^^^
59
60 error: aborting due to 9 previous errors
61