rust/tests/ui/never_type/call-fn-never-arg-wrong-typ...

12 lines
157 B
Rust

// Test that we can't pass other types for !
#![feature(never_type)]
fn foo(x: !) -> ! {
x
}
fn main() {
foo("wow"); //~ ERROR mismatched types
}