1 #![feature(core_intrinsics, rustc_attrs)]
3 use std::intrinsics::rustc_peek;
5 #[rustc_mir(rustc_peek_liveness, stop_after_dataflow)]
8 let mut x: (i32, i32) = (42, 0);
10 // Assignment to a projection does not cause `x` to become live
11 unsafe { rustc_peek(x); } //~ ERROR bit not set
16 // ...but a read from a projection does.
17 unsafe { rustc_peek(x); }
24 // Derefs are treated like a read of a local even if they are on the LHS of an assignment.
26 unsafe { rustc_peek(&p); }
28 unsafe { rustc_peek(&p); } //~ ERROR bit not set