1 // Basic test for liveness constraints: the region (`R1`) that appears
2 // in the type of `p` includes the points after `&v[0]` up to (but not
3 // including) the call to `use_x`. The `else` branch is not included.
6 #![feature(rustc_attrs)]
13 let mut my_struct
= MyStruct { field: format!("Hello") }
;
15 let value
= &my_struct
.field
;
17 my_struct
.field
.push_str("Hello, world!");
22 let mut my_struct
= MyStruct { field: format!("Hello") }
;
24 let value
= &my_struct
.field
;
26 my_struct
.field
.push_str("Hello, world!");