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

10 lines
245 B
Rust

// Test that we get the usual error that we'd get for any other return type and not something about
// diverging functions not being able to return.
fn fail() -> ! {
return; //~ ERROR in a function whose return type is not
}
fn main() {
}