Skip to content

Commit aa16ee3

Browse files
committed
Fix the test!
1 parent 5ffabae commit aa16ee3

File tree

1 file changed

+5
-2
lines changed
  • tests/run-make-cargo/panic-immediate-abort

1 file changed

+5
-2
lines changed

tests/run-make-cargo/panic-immediate-abort/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ pub fn bounds_check(x: &[u8], idx: usize) -> &u8 {
3232

3333
#[unsafe(no_mangle)]
3434
pub fn str_bounds_check(x: &str, idx: usize) -> &str {
35-
// So is this one
3635
// CHECK-LABEL: @str_bounds_check(
36+
// CHECK-NOT: call
37+
// CHECK: tail call void @llvm.trap()
38+
// CHECK-NOT: call
3739
&x[idx..]
3840
}
3941

@@ -53,8 +55,9 @@ pub fn unsigned_integer_div(x: u16, y: u16) -> u16 {
5355

5456
#[unsafe(no_mangle)]
5557
pub fn refcell_already_borrowed() {
56-
// This test is currently broken, because it panic helper doesn't get inlined
5758
// CHECK-LABEL: @refcell_already_borrowed(
59+
// CHECK-NEXT: bb1.i2
60+
// CHECK-NEXT: tail call void @llvm.trap()
5861
let r = core::cell::RefCell::new(0u8);
5962
let _guard = r.borrow_mut();
6063
r.borrow_mut();

0 commit comments

Comments
 (0)