]> git.lizzy.rs Git - rust.git/blob - tests/ui/never_type/call-fn-never-arg.rs
Rollup merge of #106321 - compiler-errors:delayed-bug-backtrace, r=Nilstrieb
[rust.git] / tests / ui / never_type / call-fn-never-arg.rs
1 // Test that we can use a ! for an argument of type !
2
3 // check-pass
4
5 #![feature(never_type)]
6 #![allow(unreachable_code)]
7
8 fn foo(x: !) -> ! {
9     x
10 }
11
12 fn main() {
13     foo(panic!("wowzers!"))
14 }