Skip to content

Commit 09e6ccc

Browse files
committed
Auto merge of #1546 - Aaron1011:fix/windows-panic, r=RalfJung
Enable some panic tests on Windows
2 parents 8b4b0b4 + 93c31e7 commit 09e6ccc

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

test-cargo-miri/tests/test.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,15 @@ fn num_cpus() {
4242
assert_eq!(num_cpus::get(), 1);
4343
}
4444

45-
46-
// FIXME: Remove this `cfg` once we fix https://github.com/rust-lang/miri/issues/1059.
47-
// We cfg-gate the `should_panic` attribute and the `panic!` itself, so that the test
48-
// stdout does not depend on the target.
4945
#[test]
50-
#[cfg_attr(not(windows), should_panic(expected="Explicit panic"))]
46+
#[should_panic(expected="Explicit panic")]
5147
fn do_panic() { // In large, friendly letters :)
52-
#[cfg(not(windows))]
5348
panic!("Explicit panic from test!");
5449
}
5550

56-
// FIXME: see above
5751
#[test]
5852
#[allow(unconditional_panic)]
59-
#[cfg_attr(not(windows), should_panic(expected="the len is 0 but the index is 42"))]
53+
#[should_panic(expected="the len is 0 but the index is 42")]
6054
fn fail_index_check() {
61-
#[cfg(not(windows))]
6255
[][42]
6356
}

0 commit comments

Comments
 (0)