this.ecx.operand_field(eval, field.index() as u64)
})?;
},
+ ProjectionElem::Deref => {
+ trace!("processing deref");
+ eval = self.use_ecx(source_info, |this| {
+ this.ecx.deref_operand(eval)
+ })?.into();
+ }
// We could get more projections by using e.g., `operand_projection`,
// but we do not even have the stack frame set up properly so
// an `Index` projection would throw us off-track.
--- /dev/null
+fn main() {
+ *(&4);
+}
+
+// END RUST SOURCE
+// START rustc.main.ConstProp.before.mir
+// bb0: {
+// ...
+// _2 = &(promoted[0]: i32);
+// _1 = (*_2);
+// ...
+//}
+// END rustc.main.ConstProp.before.mir
+// START rustc.main.ConstProp.after.mir
+// bb0: {
+// ...
+// _2 = const Scalar(AllocId(0).0x0) : &i32;
+// _1 = const 4i32;
+// ...
+// }
+// END rustc.main.ConstProp.after.mir