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.
1 parent 1799d31 commit a4090d2Copy full SHA for a4090d2
src/test/codegen/issue-27130.rs
@@ -0,0 +1,22 @@
1
+// compile-flags: -O
2
+// min-llvm-version: 11.0
3
+
4
+#![crate_type = "lib"]
5
6
+// CHECK-LABEL: @trim_in_place
7
+#[no_mangle]
8
+pub fn trim_in_place(a: &mut &[u8]) {
9
+ while a.first() == Some(&42) {
10
+ // CHECK-NOT: slice_index_order_fail
11
+ *a = &a[1..];
12
+ }
13
+}
14
15
+// CHECK-LABEL: @trim_in_place2
16
17
+pub fn trim_in_place2(a: &mut &[u8]) {
18
+ while let Some(&42) = a.first() {
19
20
21
22
0 commit comments