rust/src/test/run-pass/drop-trait-generic.rs

15 lines
160 B
Rust
Raw Normal View History

struct S<T> {
x: T
}
impl<T> S<T> : core::ops::Drop {
fn finalize(&self) {
io::println("bye");
}
}
fn main() {
let x = S { x: 1 };
}