]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/loop_test.rs
Merge commit 'e9d1a0a7b0b28dd422f1a790ccde532acafbf193' into sync_cg_clif-2022-08-24
[rust.git] / src / test / mir-opt / loop_test.rs
1 // compile-flags: -Z identify_regions
2
3 // Tests to make sure we correctly generate falseUnwind edges in loops
4
5 // EMIT_MIR loop_test.main.SimplifyCfg-promote-consts.after.mir
6 fn main() {
7     // Exit early at runtime. Since only care about the generated MIR
8     // and not the runtime behavior (which is exercised by other tests)
9     // we just bail early. Without this the test just loops infinitely.
10     if true {
11         return;
12     }
13     loop {
14         let x = 1;
15         continue;
16     }
17 }