Skip to content

Commit b9f9ab8

Browse files
committed
test: Implement a test for the Drop trait on a generic struct. a=test-only
1 parent fc06114 commit b9f9ab8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
struct S<T> {
2+
x: T
3+
}
4+
5+
impl<T> S<T> : core::ops::Drop {
6+
fn finalize() {
7+
io::println("bye");
8+
}
9+
}
10+
11+
fn main() {
12+
let x = S { x: 1 };
13+
}
14+

0 commit comments

Comments
 (0)