]> git.lizzy.rs Git - rust.git/blob - tests/run-make-fulldeps/foreign-rust-exceptions/foo.rs
Rollup merge of #107194 - xfix:remove-slice-internals-dependency-in-rustc-ast, r...
[rust.git] / tests / run-make-fulldeps / foreign-rust-exceptions / foo.rs
1 #![feature(c_unwind)]
2
3 #[cfg_attr(not(windows), link(name = "bar"))]
4 #[cfg_attr(windows, link(name = "bar.dll"))]
5 extern "C-unwind" {
6     fn panic();
7 }
8
9 fn main() {
10     let _ = std::panic::catch_unwind(|| {
11         unsafe { panic() };
12     });
13 }