3 let mut _thing1 = D(Box::new("thing1"));
5 let _thing2 = D("thing2");
7 D("other").next(&_thing1)
8 //~^ ERROR does not live long enough
16 struct D<T: std::fmt::Debug>(T);
18 impl<T: std::fmt::Debug> Drop for D<T> {
20 println!("dropping {:?})", self);
24 impl<T: std::fmt::Debug> D<T> {
25 fn next<U: std::fmt::Debug>(&self, _other: U) -> D<U> { D(_other) }