rust/tests/ui/return/return-from-diverging.rs
2023-01-11 09:32:08 +00:00

9 lines
151 B
Rust

// Test that return another type in place of ! raises a type mismatch.
fn fail() -> ! {
return "wow"; //~ ERROR mismatched types
}
fn main() {
}