fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.9 KiB61 linesraw
1error: generally you want to avoid `&mut &mut _` if possible
2  --> $DIR/mut_mut.rs:14:11
3   |
4LL | fn fun(x: &mut &mut u32) -> bool {
5   |           ^^^^^^^^^^^^^
6   |
7   = note: `-D clippy::mut-mut` implied by `-D warnings`
8   = help: to override `-D warnings` add `#[allow(clippy::mut_mut)]`
9
10error: generally you want to avoid `&mut &mut _` if possible
11  --> $DIR/mut_mut.rs:31:17
12   |
13LL |     let mut x = &mut &mut 1u32;
14   |                 ^^^^^^^^^^^^^^
15
16error: generally you want to avoid `&mut &mut _` if possible
17  --> $DIR/mut_mut.rs:46:25
18   |
19LL |     let mut z = inline!(&mut $(&mut 3u32));
20   |                         ^
21   |
22   = note: this error originates in the macro `__inline_mac_fn_main` (in Nightly builds, run with -Z macro-backtrace for more info)
23
24error: this expression mutably borrows a mutable reference. Consider reborrowing
25  --> $DIR/mut_mut.rs:33:21
26   |
27LL |         let mut y = &mut x;
28   |                     ^^^^^^
29
30error: generally you want to avoid `&mut &mut _` if possible
31  --> $DIR/mut_mut.rs:37:32
32   |
33LL |         let y: &mut &mut u32 = &mut &mut 2;
34   |                                ^^^^^^^^^^^
35
36error: generally you want to avoid `&mut &mut _` if possible
37  --> $DIR/mut_mut.rs:37:16
38   |
39LL |         let y: &mut &mut u32 = &mut &mut 2;
40   |                ^^^^^^^^^^^^^
41
42error: generally you want to avoid `&mut &mut _` if possible
43  --> $DIR/mut_mut.rs:42:37
44   |
45LL |         let y: &mut &mut &mut u32 = &mut &mut &mut 2;
46   |                                     ^^^^^^^^^^^^^^^^
47
48error: generally you want to avoid `&mut &mut _` if possible
49  --> $DIR/mut_mut.rs:42:16
50   |
51LL |         let y: &mut &mut &mut u32 = &mut &mut &mut 2;
52   |                ^^^^^^^^^^^^^^^^^^
53
54error: generally you want to avoid `&mut &mut _` if possible
55  --> $DIR/mut_mut.rs:42:21
56   |
57LL |         let y: &mut &mut &mut u32 = &mut &mut &mut 2;
58   |                     ^^^^^^^^^^^^^
59
60error: aborting due to 9 previous errors
61