From 50773991d3f8dee3cda032f6d1289277cdd9da25 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 29 Jul 2018 22:29:49 +0200 Subject: [PATCH] make sure that the no-panic test tests what it is supposed to test --- src/test/codegen/slice-position-bounds-check.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/test/codegen/slice-position-bounds-check.rs b/src/test/codegen/slice-position-bounds-check.rs index bcbf7fd83cf0..aae81ae84922 100644 --- a/src/test/codegen/slice-position-bounds-check.rs +++ b/src/test/codegen/slice-position-bounds-check.rs @@ -32,3 +32,11 @@ pub fn position_no_bounds_check(y: &mut [u32], x: &u32, z: &u32) -> bool { false } } + +// just to make sure that panicking really emits "panic" somewhere in the IR +// CHECK-LABEL: @test_check +#[no_mangle] +pub fn test_check() { + // CHECK: panic + unreachable!() +}