2023-10-16 12:36:39 -05:00
|
|
|
// skip-filecheck
|
2024-02-22 06:10:29 -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;
|
|
|
|
}
|
|
|
|
}
|