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 20:18:07 -05:00
fn drop(&mut self) {
println!("bye");
}
}
pub fn main() {
2013-08-17 10:37:42 -05:00
let _x: Foo = Foo { x: 3 };
}