2023-10-16 12:36:39 -05:00
|
|
|
// skip-filecheck
|
2018-11-10 17:02:13 -06:00
|
|
|
//@ compile-flags: -Z identify_regions
|
2018-02-07 19:00:54 -06:00
|
|
|
|
|
|
|
// Tests to make sure we correctly generate falseUnwind edges in loops
|
|
|
|
|
2020-08-16 03:44:53 -05:00
|
|
|
// EMIT_MIR loop_test.main.SimplifyCfg-promote-consts.after.mir
|
2018-02-07 19:00:54 -06:00
|
|
|
fn main() {
|
|
|
|
// Exit early at runtime. Since only care about the generated MIR
|
|
|
|
// and not the runtime behavior (which is exercised by other tests)
|
|
|
|
// we just bail early. Without this the test just loops infinitely.
|
|
|
|
if true {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
loop {
|
|
|
|
let x = 1;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|