summaryrefslogtreecommitdiffstats
path: root/tests/ui/cfg/cfg-panic.rs
blob: 2de72d54a481a97701b5b9d6f32c3bc03712f174 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// build-pass
// compile-flags: -C panic=unwind
// needs-unwind


#[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() { }