mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-05 14:37:37 +00:00

To avoid having target-dependent "unwinding panics are not supported without std" errors, without regressing test intention.
18 lines
533 B
Rust
18 lines
533 B
Rust
// Error, the linked empty library is `no_std` and doesn't provide a panic handler.
|
|
|
|
//@ 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]
|
|
|
|
extern crate cfg_false_lib_no_std_before as _;
|
|
|
|
fn main() {}
|
|
|
|
//~? ERROR `#[panic_handler]` function required, but not found
|