1
Fork 0

test: Implement a test for the Drop trait on a generic struct. a=test-only

This commit is contained in:
Patrick Walton 2012-11-28 14:18:51 -08:00
parent fc06114ddf
commit b9f9ab8f77

View file

@ -0,0 +1,14 @@
struct S<T> {
x: T
}
impl<T> S<T> : core::ops::Drop {
fn finalize() {
io::println("bye");
}
}
fn main() {
let x = S { x: 1 };
}