]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/loop_test.rs
Rollup merge of #99479 - Enselic:import-can-be-without-id, r=camelid
[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 }