1 // rust-lang/rust#22323: regression test demonstrating that NLL
2 // precisely tracks temporary destruction order.
9 let _s = construct().borrow().consume_borrowed();
12 fn construct() -> Value { Value }
17 fn borrow<'a>(&'a self) -> Borrowed<'a> { unimplemented!() }
20 pub struct Borrowed<'a> {
21 _inner: Guard<'a, Value>,
24 impl<'a> Borrowed<'a> {
25 fn consume_borrowed(self) -> String { unimplemented!() }
28 pub struct Guard<'a, T: ?Sized + 'a> {
32 impl<'a, T: ?Sized> Drop for Guard<'a, T> { fn drop(&mut self) {} }