blob: 266987c5b6d63b117c1deeeb37535b917e52730e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#![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() };
});
}
|