]> git.proxmox.com Git - rustc.git/blob - tests/mir-opt/loop_test.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / 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 }