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
192 B
Rust
Raw Normal View History

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