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 9c20f83 commit e49d30eCopy full SHA for e49d30e
tests/mir-opt/array_index_is_temporary.rs
@@ -1,4 +1,4 @@
1
-// skip-filecheck
+// unit-test: SimplifyCfg-elaborate-drops
2
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
3
// Retagging (from Stacked Borrows) relies on the array index being a fresh
4
// temporary, so that side-effects cannot change it.
@@ -12,6 +12,12 @@ unsafe fn foo(z: *mut usize) -> u32 {
12
13
// EMIT_MIR array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir
14
fn main() {
15
+ // CHECK-LABEL: fn main(
16
+ // CHECK: debug x => [[x:_.*]];
17
+ // CHECK: debug y => [[y:_.*]];
18
+ // CHECK: [[y]] = const 1_usize;
19
+ // CHECK: [[tmp:_.*]] = [[y]];
20
+ // CHECK: [[x]][[[tmp]]] =
21
let mut x = [42, 43, 44];
22
let mut y = 1;
23
let z: *mut usize = &mut y;
0 commit comments