]> git.lizzy.rs Git - rust.git/blob - src/test/ui/never_type/call-fn-never-arg.rs
Rollup merge of #102137 - b-naber:lazy-const-val-conversion, r=lcnr
[rust.git] / src / test / 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 }