We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
escape_debug
1 parent e4fb17f commit aa52882Copy full SHA for aa52882
tests/codegen/char-escape-debug-no-bounds-check.rs
@@ -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