1 // check that dropck does the right thing with misc. Ty variants
4 struct NoisyDrop<T: fmt::Debug>(T);
5 impl<T: fmt::Debug> Drop for NoisyDrop<T> {
8 println!("dropping {:?}", self.0)
15 impl<T: fmt::Debug> Associator for T {
16 type As = NoisyDrop<T>;
18 struct Wrap<A: Associator>(<A as Associator>::As);
23 _w = Wrap::<&[&str]>(NoisyDrop(&bomb));
25 //~^^ ERROR `bomb` does not live long enough
31 let u = NoisyDrop(&v);
32 //~^ ERROR `v` does not live long enough
37 fn main() { closure(); projection() }