blob: 113efae82c510a1122c4c26f54a4d7d081ac347f [file] [log] [blame]
struct Foo {
x: i32,
}
impl Drop for Foo {
fn drop(&mut self) {
println!("kaboom");
}
}
fn main() {
let mut x = Foo { x: -7 };
x.drop();
//~^ ERROR E0040
}