]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/non-terminate/infinite-loop-2.rs
Add comments to hygiene tests
[rust.git] / src / test / codegen / non-terminate / infinite-loop-2.rs
1 // min-llvm-version: 12.0
2 // compile-flags: -C opt-level=3
3
4 #![crate_type = "lib"]
5
6 fn infinite_loop() -> u8 {
7     let i = 2;
8     while i > 1 {}
9     1
10 }
11
12 // CHECK-LABEL: @test
13 #[no_mangle]
14 fn test() -> u8 {
15     // CHECK-NOT: unreachable
16     // CHECK: br label %{{.+}}
17     // CHECK-NOT: unreachable
18     let x = infinite_loop();
19     x
20 }