e36df0f6c8
Previously, typestate would conclude that this function was correctly diverging: fn f() -> ! { ret; fail; } even though it always returns to the caller. It wasn't handling the i_diverge and i_return bits correctly in the fail case. Fixed it. Closes #897
4 lines
121 B
Rust
4 lines
121 B
Rust
// error-pattern: In non-returning function f, some control paths may return
|
|
fn f() -> ! { ret 42; fail; }
|
|
fn main() { }
|