Skip to content

Commit 76c90c3

Browse files
committed
Use #![warn(let_underscore_drop)] in tests.
1 parent d355ec9 commit 76c90c3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/test/ui/lint/let_underscore/let_underscore_drop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// check-pass
2-
// compile-flags: -W let_underscore_drop
2+
#![warn(let_underscore_drop)]
33

44
struct NontrivialDrop;
55

src/test/ui/lint/let_underscore/let_underscore_drop.stderr

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ warning: non-binding let on a type that implements `Drop`
44
LL | let _ = NontrivialDrop;
55
| ^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: requested on the command line with `-W let-underscore-drop`
7+
note: the lint level is defined here
8+
--> $DIR/let_underscore_drop.rs:2:9
9+
|
10+
LL | #![warn(let_underscore_drop)]
11+
| ^^^^^^^^^^^^^^^^^^^
812
help: consider binding to an unused variable to avoid immediately dropping the value
913
|
1014
LL | let _unused = NontrivialDrop;

0 commit comments

Comments
 (0)