rust/tests/ui/drop/drop-trait.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
191 B
Rust
Raw Normal View History

// run-pass
#![allow(dead_code)]
struct Foo {
x: isize
}
impl Drop for Foo {
2013-09-16 21:18:07 -04:00
fn drop(&mut self) {
println!("bye");
}
}
pub fn main() {
2013-08-17 08:37:42 -07:00
let _x: Foo = Foo { x: 3 };
}