1 struct Wrap<'p> { p: &'p mut i32 }
3 impl<'p> Drop for Wrap<'p> {
9 struct Foo<'p> { a: String, b: Wrap<'p> }
13 let wrap = Wrap { p: &mut x };
14 let s = String::from("str");
15 let foo = Foo { a: s, b: wrap };
16 std::mem::drop(foo.b);
17 x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506]
18 // FIXME ^ Should not error in the future with implicit dtors, only manually implemented ones