summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/mut_mut.stderr
blob: 6820a85aa54337f2cad40936ed7d0f6bad95358b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
error: generally you want to avoid `&mut &mut _` if possible
  --> $DIR/mut_mut.rs:9:11
   |
LL | fn fun(x: &mut &mut u32) -> bool {
   |           ^^^^^^^^^^^^^
   |
   = note: `-D clippy::mut-mut` implied by `-D warnings`

error: generally you want to avoid `&mut &mut _` if possible
  --> $DIR/mut_mut.rs:25:17
   |
LL |     let mut x = &mut &mut 1u32;
   |                 ^^^^^^^^^^^^^^

error: generally you want to avoid `&mut &mut _` if possible
  --> $DIR/mut_mut.rs:19:9
   |
LL |         &mut $p
   |         ^^^^^^^
...
LL |     let mut z = mut_ptr!(&mut 3u32);
   |                 ------------------- in this macro invocation
   |
   = note: this error originates in the macro `mut_ptr` (in Nightly builds, run with -Z macro-backtrace for more info)

error: this expression mutably borrows a mutable reference. Consider reborrowing
  --> $DIR/mut_mut.rs:27:21
   |
LL |         let mut y = &mut x;
   |                     ^^^^^^

error: generally you want to avoid `&mut &mut _` if possible
  --> $DIR/mut_mut.rs:31:32
   |
LL |         let y: &mut &mut u32 = &mut &mut 2;
   |                                ^^^^^^^^^^^

error: generally you want to avoid `&mut &mut _` if possible
  --> $DIR/mut_mut.rs:31:16
   |
LL |         let y: &mut &mut u32 = &mut &mut 2;
   |                ^^^^^^^^^^^^^

error: generally you want to avoid `&mut &mut _` if possible
  --> $DIR/mut_mut.rs:36:37
   |
LL |         let y: &mut &mut &mut u32 = &mut &mut &mut 2;
   |                                     ^^^^^^^^^^^^^^^^

error: generally you want to avoid `&mut &mut _` if possible
  --> $DIR/mut_mut.rs:36:16
   |
LL |         let y: &mut &mut &mut u32 = &mut &mut &mut 2;
   |                ^^^^^^^^^^^^^^^^^^

error: generally you want to avoid `&mut &mut _` if possible
  --> $DIR/mut_mut.rs:36:21
   |
LL |         let y: &mut &mut &mut u32 = &mut &mut &mut 2;
   |                     ^^^^^^^^^^^^^

error: aborting due to 9 previous errors