]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/mut_mut.stderr
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / mut_mut.stderr
diff --git a/src/tools/clippy/tests/ui/mut_mut.stderr b/src/tools/clippy/tests/ui/mut_mut.stderr
new file mode 100644 (file)
index 0000000..44e8142
--- /dev/null
@@ -0,0 +1,63 @@
+error: generally you want to avoid `&mut &mut _` if possible
+  --> $DIR/mut_mut.rs:4: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:20:17
+   |
+LL |     let mut x = &mut &mut 1u32;
+   |                 ^^^^^^^^^^^^^^
+
+error: generally you want to avoid `&mut &mut _` if possible
+  --> $DIR/mut_mut.rs:14:9
+   |
+LL |         &mut $p
+   |         ^^^^^^^
+...
+LL |     let mut z = mut_ptr!(&mut 3u32);
+   |                 ------------------- in this macro invocation
+   |
+   = note: this error originates in a macro (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:22:21
+   |
+LL |         let mut y = &mut x;
+   |                     ^^^^^^
+
+error: generally you want to avoid `&mut &mut _` if possible
+  --> $DIR/mut_mut.rs:26:32
+   |
+LL |         let y: &mut &mut u32 = &mut &mut 2;
+   |                                ^^^^^^^^^^^
+
+error: generally you want to avoid `&mut &mut _` if possible
+  --> $DIR/mut_mut.rs:26:16
+   |
+LL |         let y: &mut &mut u32 = &mut &mut 2;
+   |                ^^^^^^^^^^^^^
+
+error: generally you want to avoid `&mut &mut _` if possible
+  --> $DIR/mut_mut.rs:31: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:31: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:31:21
+   |
+LL |         let y: &mut &mut &mut u32 = &mut &mut &mut 2;
+   |                     ^^^^^^^^^^^^^
+
+error: aborting due to 9 previous errors
+