mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
14 lines
245 B
Rust
14 lines
245 B
Rust
#![feature(c_unwind)]
|
|
|
|
#[cfg_attr(not(windows), link(name = "bar"))]
|
|
#[cfg_attr(windows, link(name = "bar.dll"))]
|
|
extern "C-unwind" {
|
|
fn panic();
|
|
}
|
|
|
|
fn main() {
|
|
let _ = std::panic::catch_unwind(|| {
|
|
unsafe { panic() };
|
|
});
|
|
}
|