diff --git a/tests/compile-fail/erroneous_const.rs b/tests/compile-fail/erroneous_const.rs index bbaaa4625a..e8cd8f2e7d 100644 --- a/tests/compile-fail/erroneous_const.rs +++ b/tests/compile-fail/erroneous_const.rs @@ -2,7 +2,7 @@ //! (https://github.com/rust-lang/miri/issues/1382) #![feature(const_panic)] #![feature(never_type)] -#![warn(const_err)] +#![warn(warnings, const_err)] struct PrintName(T); impl PrintName { @@ -10,8 +10,8 @@ impl PrintName { } fn no_codegen() { - if false { - let _ = PrintName::::VOID; //~ERROR referenced constant has errors + if false { //~ERROR referenced constant has errors + let _ = PrintName::::VOID; } } fn main() {