You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use std::fmt;structNoisyDrop<T: fmt::Debug>(T);impl<T: fmt::Debug>DropforNoisyDrop<T>{fndrop(&mutself){println!("dropping {:?}",self.0)}}structBar<T: fmt::Debug>([*constNoisyDrop<T>;2]);fnfine(){let(u,b);
u = vec![43];
b = Bar([&NoisyDrop(&u),&NoisyDrop(&u)]);// ^ this compiles}structBar2<T: fmt::Debug>(*constNoisyDrop<T>,*constNoisyDrop<T>);fnlolwut(){let(u,v);
u = vec![43];
v = Bar2(&NoisyDrop(&u),&NoisyDrop(&u));//~^ ERROR `u` does not live long enough}fnmain(){}
cc @pnkfelix
The text was updated successfully, but these errors were encountered: