tests: fix a panic strategy in cfg_false_no_std-2.rs
To avoid having target-dependent "unwinding panics are not supported without std" errors, without regressing test intention.
This commit is contained in:
parent
d7df5bdf29
commit
a6cac47500
1 changed files with 5 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue