summaryrefslogtreecommitdiffstats
path: root/src/test/ui/never_type/call-fn-never-arg.rs
blob: 9d355817ee80dc459ad86ebfce4f4a79d3d194ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Test that we can use a ! for an argument of type !

// check-pass

#![feature(never_type)]
#![allow(unreachable_code)]

fn foo(x: !) -> ! {
    x
}

fn main() {
    foo(panic!("wowzers!"))
}