]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/unnecessary_ref.stderr
New upstream version 1.52.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / unnecessary_ref.stderr
diff --git a/src/tools/clippy/tests/ui/unnecessary_ref.stderr b/src/tools/clippy/tests/ui/unnecessary_ref.stderr
new file mode 100644 (file)
index 0000000..436f4bc
--- /dev/null
@@ -0,0 +1,22 @@
+error: creating a reference that is immediately dereferenced
+  --> $DIR/unnecessary_ref.rs:13:17
+   |
+LL |     let inner = (&outer).inner;
+   |                 ^^^^^^^^ help: try this: `outer`
+   |
+note: the lint level is defined here
+  --> $DIR/unnecessary_ref.rs:10:8
+   |
+LL | #[deny(clippy::ref_in_deref)]
+   |        ^^^^^^^^^^^^^^^^^^^^
+
+error: creating a reference that is immediately dereferenced
+  --> $DIR/unnecessary_ref.rs:22:16
+   |
+LL |     unsafe { &*(&*package).0 }.hello();
+   |                ^^^^^^^^^^^ help: try this: `(*package)`
+   |
+   = note: `-D clippy::ref-in-deref` implied by `-D warnings`
+
+error: aborting due to 2 previous errors
+