diff options
| author | Ralf Jung <post@ralfj.de> | 2018-07-29 22:29:49 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2018-07-31 10:33:32 +0200 |
| commit | 50773991d3f8dee3cda032f6d1289277cdd9da25 (patch) | |
| tree | 8e46fc220118de609e7aeb7bdd4958fd01648320 /src/test/codegen | |
| parent | 90165b82fcd455deacfbecdc79953988342d5796 (diff) | |
| download | rust-50773991d3f8dee3cda032f6d1289277cdd9da25.tar.gz rust-50773991d3f8dee3cda032f6d1289277cdd9da25.zip | |
make sure that the no-panic test tests what it is supposed to test
Diffstat (limited to 'src/test/codegen')
| -rw-r--r-- | src/test/codegen/slice-position-bounds-check.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/codegen/slice-position-bounds-check.rs b/src/test/codegen/slice-position-bounds-check.rs index bcbf7fd83cf..aae81ae8492 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!() +} |
