Skip to content

Commit 1fe874c

Browse files
committed
Add test for escape_debug without bounds check.
1 parent 281f7b4 commit 1fe874c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//@ compile-flags: -Copt-level=3
2+
#![crate_type = "lib"]
3+
4+
// Make sure no bounds checks are emitted when escaping a character.
5+
6+
// CHECK-LABEL: @char_escape_debug_no_bounds_check
7+
#[no_mangle]
8+
pub fn char_escape_debug_no_bounds_check(c: char) -> EscapeDebug {
9+
// CHECK-NOT: panic
10+
// CHECK-NOT: panic_bounds_check
11+
c.escape_debug()
12+
}

0 commit comments

Comments
 (0)