Skip to content

Commit fb7d8a1

Browse files
committed
hopefully make test pass on windows
1 parent 5077399 commit fb7d8a1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
// no-system-llvm
12-
// compile-flags: -O
12+
// compile-flags: -O -C panic=abort
1313
#![crate_type = "lib"]
1414

1515
fn search<T: Ord + Eq>(arr: &mut [T], a: &T) -> Result<usize, ()> {
@@ -25,18 +25,18 @@ fn search<T: Ord + Eq>(arr: &mut [T], a: &T) -> Result<usize, ()> {
2525
#[no_mangle]
2626
pub fn position_no_bounds_check(y: &mut [u32], x: &u32, z: &u32) -> bool {
2727
// This contains "call assume" so we cannot just rule out all calls
28-
// CHECK-NOT: panic
28+
// CHECK-NOT: panic_bounds_check
2929
if let Ok(p) = search(y, x) {
3030
y[p] == *z
3131
} else {
3232
false
3333
}
3434
}
3535

36-
// just to make sure that panicking really emits "panic" somewhere in the IR
36+
// just to make sure that panicking really emits "panic_bounds_check" somewhere in the IR
3737
// CHECK-LABEL: @test_check
3838
#[no_mangle]
39-
pub fn test_check() {
40-
// CHECK: panic
41-
unreachable!()
39+
pub fn test_check(y: &[i32]) -> i32 {
40+
// CHECK: panic_bounds_check
41+
y[12]
4242
}

0 commit comments

Comments
 (0)