rustc: Implement the Drop trait. r=brson
This commit is contained in:
parent
70886d314d
commit
2904095570
11 changed files with 200 additions and 23 deletions
12
src/test/compile-fail/drop-on-non-struct.rs
Normal file
12
src/test/compile-fail/drop-on-non-struct.rs
Normal file
|
@ -0,0 +1,12 @@
|
|||
type Foo = @[u8];
|
||||
|
||||
impl Foo : Drop { //~ ERROR the Drop trait may only be implemented
|
||||
fn finalize() {
|
||||
io::println("kaboom");
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue