diff --git a/tests/compile-fail/validity/nonzero.rs b/tests/compile-fail/validity/nonzero.rs index f820b0e810..dbb31b3f17 100644 --- a/tests/compile-fail/validity/nonzero.rs +++ b/tests/compile-fail/validity/nonzero.rs @@ -1,3 +1,4 @@ +// compile-flags: -Zmir-opt-level=1 #![feature(rustc_attrs)] #![allow(unused_attributes)] diff --git a/tests/compiletest.rs b/tests/compiletest.rs index eaaa87464d..9cead530b5 100644 --- a/tests/compiletest.rs +++ b/tests/compiletest.rs @@ -69,9 +69,7 @@ fn compile_fail(path: &str, target: &str, opt: bool) { let mut flags = Vec::new(); if opt { - // FIXME: Opt level 2 ICEs during stack trace generation. - // See https://github.com/rust-lang/rust/issues/66077. - flags.push("-Zmir-opt-level=1".to_owned()); + flags.push("-Zmir-opt-level=3".to_owned()); } run_tests("compile-fail", path, target, flags);