Skip to content

Commit 5077399

Browse files
committed
make sure that the no-panic test tests what it is supposed to test
1 parent 90165b8 commit 5077399

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/test/codegen/slice-position-bounds-check.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,11 @@ pub fn position_no_bounds_check(y: &mut [u32], x: &u32, z: &u32) -> bool {
3232
false
3333
}
3434
}
35+
36+
// just to make sure that panicking really emits "panic" somewhere in the IR
37+
// CHECK-LABEL: @test_check
38+
#[no_mangle]
39+
pub fn test_check() {
40+
// CHECK: panic
41+
unreachable!()
42+
}

0 commit comments

Comments
 (0)