From 76c90c3015a7e3ad6f0e6b807839ff59f17eba89 Mon Sep 17 00:00:00 2001 From: Aaron Kofsky Date: Fri, 5 Aug 2022 13:20:43 -0400 Subject: [PATCH] Use `#![warn(let_underscore_drop)]` in tests. --- src/test/ui/lint/let_underscore/let_underscore_drop.rs | 2 +- src/test/ui/lint/let_underscore/let_underscore_drop.stderr | 6 +++++- 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 85ca5dd2880a4..f298871f122d3 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 cf7b882e946d9..7b7de202e4626 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;