Closed Munksgaard closed 9 years ago
The following code compiles without errors:
#![feature(plugin)] #![feature(custom_attribute)] #![plugin(humpty_dumpty)] #![allow(unused_attributes)] #![allow(unused_variables)] #![allow(dead_code)] #[drop_protect] struct Foo; impl Foo { #[allow_drop="Foo"] fn close(self) { } } fn test1() { let f = vec!(Foo); //~ ERROR dropped for i in f { if true { break; } i.close(); } } fn main() {}
It really shouldn't.
The following code compiles without errors:
It really shouldn't.