rust/tests/ui/cfg/cfg-panic.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
292 B
Rust
Raw Normal View History

2020-07-25 18:02:49 +00:00
// build-pass
// compile-flags: -C panic=unwind
2021-04-29 17:04:16 +00:00
// needs-unwind
2020-07-25 18:02:49 +00:00
#[cfg(panic = "abort")]
pub fn bad() -> i32 { }
#[cfg(not(panic = "unwind"))]
pub fn bad() -> i32 { }
#[cfg(panic = "some_imaginary_future_panic_handler")]
pub fn bad() -> i32 { }
#[cfg(panic = "unwind")]
pub fn main() { }