FileCheck ref_deref.
This commit is contained in:
parent
c8c9207e4c
commit
6baec3ccc2
@ -7,6 +7,9 @@
|
||||
let mut _2: &i32;
|
||||
let _3: i32;
|
||||
let mut _4: &i32;
|
||||
scope 1 {
|
||||
debug a => _1;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1);
|
||||
@ -15,8 +18,8 @@
|
||||
_2 = &(*_4);
|
||||
_1 = (*_2);
|
||||
StorageDead(_2);
|
||||
StorageDead(_1);
|
||||
_0 = const ();
|
||||
StorageDead(_1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// EMIT_MIR ref_deref.main.ConstProp.diff
|
||||
|
||||
// EMIT_MIR ref_deref.main.ConstProp.diff
|
||||
fn main() {
|
||||
*(&4);
|
||||
// CHECK-LABEL: fn main(
|
||||
// CHECK: debug a => [[a:_.*]];
|
||||
// CHECK: [[a]] = (*{{_.*}});
|
||||
let a = *(&4);
|
||||
}
|
||||
|
@ -7,6 +7,9 @@
|
||||
let mut _2: &i32;
|
||||
let _3: (i32, i32);
|
||||
let mut _4: &(i32, i32);
|
||||
scope 1 {
|
||||
debug a => _1;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1);
|
||||
@ -15,8 +18,8 @@
|
||||
_2 = &((*_4).1: i32);
|
||||
_1 = (*_2);
|
||||
StorageDead(_2);
|
||||
StorageDead(_1);
|
||||
_0 = const ();
|
||||
StorageDead(_1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,10 @@
|
||||
// skip-filecheck
|
||||
// This does not currently propagate (#67862)
|
||||
// unit-test: ConstProp
|
||||
// EMIT_MIR ref_deref_project.main.ConstProp.diff
|
||||
|
||||
// EMIT_MIR ref_deref_project.main.ConstProp.diff
|
||||
fn main() {
|
||||
*(&(4, 5).1); // This does not currently propagate (#67862)
|
||||
// CHECK-LABEL: fn main(
|
||||
// CHECK: debug a => [[a:_.*]];
|
||||
// CHECK: [[a]] = (*{{_.*}});
|
||||
let a = *(&(4, 5).1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user