diff --git a/test-cargo-miri/tests/test.rs b/test-cargo-miri/tests/test.rs index bc00cb6a765c..5d1beaec9806 100644 --- a/test-cargo-miri/tests/test.rs +++ b/test-cargo-miri/tests/test.rs @@ -42,8 +42,13 @@ fn num_cpus() { assert_eq!(num_cpus::get(), 1); } + +// FIXME: Remove this `cfg` once we fix https://github.com/rust-lang/miri/issues/1059 +// We cfg-gate the `should_panic` attribute and the `panic!` itself, so that the test +// stdout does not depend on the platform #[test] -#[should_panic] +#[cfg_attr(not(windows), should_panic)] fn do_panic() { // In large, friendly letters :) + #[cfg(not(windows))] panic!("Explicit panic from test!"); }