]> git.lizzy.rs Git - rust.git/blob - src/test/run-fail/return-never-coerce.rs
Use better bound names in `-Zverbose` mode
[rust.git] / src / test / run-fail / return-never-coerce.rs
1 // Test that ! coerces to other types.
2
3 // error-pattern:aah!
4
5 fn call_another_fn<T, F: FnOnce() -> T>(f: F) -> T {
6     f()
7 }
8
9 fn wub() -> ! {
10     panic!("aah!");
11 }
12
13 fn main() {
14     let x: i32 = call_another_fn(wub);
15     let y: u32 = wub();
16 }