]> git.lizzy.rs Git - rust.git/blob - src/test/run-fail/call-fn-never-arg.rs
Auto merge of #61212 - alexcrichton:skip-rustc, r=pietroalbini
[rust.git] / src / test / run-fail / call-fn-never-arg.rs
1 // Test that we can use a ! for an argument of type !
2
3 // error-pattern:wowzers!
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 }