Skip to content

Commit cb73af3

Browse files
committed
tests: explain why two-panic-runtimes.rs ignores target-dependent errors
1 parent a6cac47 commit cb73af3

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

tests/ui/panic-runtime/two-panic-runtimes.rs

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
// ignore-tidy-linelength
22
//@ build-fail
3-
//@ dont-require-annotations: ERROR
43
//@ dont-check-compiler-stderr
54
//@ aux-build:panic-runtime-unwind.rs
65
//@ aux-build:panic-runtime-unwind2.rs
76
//@ aux-build:panic-runtime-lang-items.rs
87

8+
// NOTE: there can be additional errors regarding trying to mix this crate if the precompiled target
9+
// (such as `wasm32-unknown-unknown` currently unconditionally defaulting to panic=abort) panic
10+
// strategy differs to abort, then involving a potentially-unwinding `panic_runtime_unwind` that
11+
// uses a different panic strategy. These errors are important but not to the test intention, which
12+
// is to check that trying to bring two panic runtimes (`panic_runtime_unwind`) and
13+
// (`panic_runtime_unwind2`) is prohibited. As such, the additional errors are not checked in this
14+
// test.
15+
//@ dont-require-annotations: ERROR
16+
917
#![no_std]
1018
#![no_main]
1119

@@ -16,7 +24,3 @@ extern crate panic_runtime_lang_items;
1624
fn main() {}
1725

1826
//~? ERROR cannot link together two panic runtimes: panic_runtime_unwind and panic_runtime_unwind2
19-
// FIXME: These errors are target-dependent, could be served by some "optional error" annotation
20-
// instead of `dont-require-annotations`.
21-
//FIXME~? ERROR the linked panic runtime `panic_runtime_unwind2` is not compiled with this crate's panic strategy `abort`
22-
//FIXME~? ERROR the crate `panic_runtime_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`

0 commit comments

Comments
 (0)