rust/tests/ui/mir/mir_codegen_call_converging.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
191 B
Rust
Raw Normal View History

//@ run-pass
2015-12-21 16:58:18 +00:00
fn converging_fn() -> u64 {
43
}
fn mir() -> u64 {
let x;
loop {
x = converging_fn();
break;
}
x
}
fn main() {
assert_eq!(mir(), 43);
}