]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/simplify_cfg.rs
Add #[const_trait] where needed in tests.
[rust.git] / src / test / mir-opt / simplify_cfg.rs
1 // Test that the goto chain starting from bb0 is collapsed.
2 // compile-flags: -Cpanic=abort
3 // no-prefer-dynamic
4
5 // EMIT_MIR simplify_cfg.main.SimplifyCfg-initial.diff
6 // EMIT_MIR simplify_cfg.main.SimplifyCfg-early-opt.diff
7 fn main() {
8     loop {
9         if bar() {
10             break;
11         }
12     }
13 }
14
15 #[inline(never)]
16 fn bar() -> bool {
17     true
18 }