From b0b76a5db31c57aace6fd7c6302f02b3dd63fae0 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 11 May 2023 10:09:20 +0200 Subject: [PATCH] fix deny_lint test --- src/tools/miri/tests/fail/deny_lint.rs | 2 +- src/tools/miri/tests/fail/deny_lint.stderr | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/tools/miri/tests/fail/deny_lint.rs b/src/tools/miri/tests/fail/deny_lint.rs index 217d5677584..f49fa49d09d 100644 --- a/src/tools/miri/tests/fail/deny_lint.rs +++ b/src/tools/miri/tests/fail/deny_lint.rs @@ -1,6 +1,6 @@ //@error-in-other-file: miri cannot be run on programs that fail compilation -#![deny(warnings)] +#![deny(warnings, unused)] struct Foo; //~^ ERROR: struct `Foo` is never constructed diff --git a/src/tools/miri/tests/fail/deny_lint.stderr b/src/tools/miri/tests/fail/deny_lint.stderr index bb48fcc2038..d1c9b481807 100644 --- a/src/tools/miri/tests/fail/deny_lint.stderr +++ b/src/tools/miri/tests/fail/deny_lint.stderr @@ -4,7 +4,12 @@ error: struct `Foo` is never constructed LL | struct Foo; | ^^^ | - = note: `-D dead-code` implied by `-D unused` +note: the lint level is defined here + --> $DIR/deny_lint.rs:LL:CC + | +LL | #![deny(warnings, unused)] + | ^^^^^^ + = note: `#[deny(dead_code)]` implied by `#[deny(unused)]` error: miri cannot be run on programs that fail compilation