about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAaron Kofsky <aaronko@umich.edu>2022-08-05 13:20:43 -0400
committerAaron Kofsky <aaronko@umich.edu>2022-08-05 13:20:43 -0400
commit76c90c3015a7e3ad6f0e6b807839ff59f17eba89 (patch)
tree6b027a8d23c4307f83a2d3b8881e184edb28a102
parentd355ec94ff0ef409bfa953f715987a98de13fd64 (diff)
downloadrust-76c90c3015a7e3ad6f0e6b807839ff59f17eba89.tar.gz
rust-76c90c3015a7e3ad6f0e6b807839ff59f17eba89.zip
Use `#![warn(let_underscore_drop)]` in tests.
-rw-r--r--src/test/ui/lint/let_underscore/let_underscore_drop.rs2
-rw-r--r--src/test/ui/lint/let_underscore/let_underscore_drop.stderr6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/test/ui/lint/let_underscore/let_underscore_drop.rs b/src/test/ui/lint/let_underscore/let_underscore_drop.rs
index 85ca5dd2880..f298871f122 100644
--- a/src/test/ui/lint/let_underscore/let_underscore_drop.rs
+++ b/src/test/ui/lint/let_underscore/let_underscore_drop.rs
@@ -1,5 +1,5 @@
 // check-pass
-// compile-flags: -W let_underscore_drop
+#![warn(let_underscore_drop)]
 
 struct NontrivialDrop;
 
diff --git a/src/test/ui/lint/let_underscore/let_underscore_drop.stderr b/src/test/ui/lint/let_underscore/let_underscore_drop.stderr
index cf7b882e946..7b7de202e46 100644
--- a/src/test/ui/lint/let_underscore/let_underscore_drop.stderr
+++ b/src/test/ui/lint/let_underscore/let_underscore_drop.stderr
@@ -4,7 +4,11 @@ warning: non-binding let on a type that implements `Drop`
 LL |     let _ = NontrivialDrop;
    |     ^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: requested on the command line with `-W let-underscore-drop`
+note: the lint level is defined here
+  --> $DIR/let_underscore_drop.rs:2:9
+   |
+LL | #![warn(let_underscore_drop)]
+   |         ^^^^^^^^^^^^^^^^^^^
 help: consider binding to an unused variable to avoid immediately dropping the value
    |
 LL |     let _unused = NontrivialDrop;