]>
Commit | Line | Data |
---|---|---|
6a06907d XL |
1 | #![crate_type = "staticlib"] |
2 | #![feature(c_unwind)] | |
3 | ||
4 | /// This function will panic if `x` is greater than 10. | |
5 | /// | |
6 | /// This function is called by `add_small_numbers`. | |
7 | #[no_mangle] | |
8 | pub extern "C-unwind" fn panic_if_greater_than_10(x: u32) { | |
9 | if x > 10 { | |
10 | panic!("{}", x); // That is too big! | |
11 | } | |
12 | } |