about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/ui/cfg/cfg_false_no_std-2.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/ui/cfg/cfg_false_no_std-2.rs b/tests/ui/cfg/cfg_false_no_std-2.rs
index 18b2c699fd7..666c90deaf0 100644
--- a/tests/ui/cfg/cfg_false_no_std-2.rs
+++ b/tests/ui/cfg/cfg_false_no_std-2.rs
@@ -1,7 +1,11 @@
 // Error, the linked empty library is `no_std` and doesn't provide a panic handler.
 
-//@ dont-require-annotations: ERROR
 //@ dont-check-compiler-stderr
+
+// NOTE: fix a panic strategy to prevent differing errors subject to target's default panic strategy
+// which changes between targets. The specific panic strategy doesn't matter for test intention.
+//@ compile-flags: -Cpanic=abort
+
 //@ aux-build: cfg_false_lib_no_std_before.rs
 
 #![no_std]
@@ -11,6 +15,3 @@ extern crate cfg_false_lib_no_std_before as _;
 fn main() {}
 
 //~? ERROR `#[panic_handler]` function required, but not found
-// FIXME: This error is target-dependent, could be served by some "optional error" annotation
-// instead of `dont-require-annotations`.
-//FIXME~? ERROR unwinding panics are not supported without std