3 let mut _thing1 = D(Box::new("thing1"));
4 // D("other").next(&_thing1).end()
5 D(&_thing1).end() //~ ERROR does not live long enough
12 struct D<T: std::fmt::Debug>(T);
14 impl<T: std::fmt::Debug> Drop for D<T> {
16 println!("dropping {:?})", self);
20 impl<T: std::fmt::Debug> D<T> {
21 fn next<U: std::fmt::Debug>(&self, _other: U) -> D<U> { D(_other) }