rust/src/test/compile-fail/kindck-destructor-owned.rs
2013-05-03 20:01:42 -04:00

12 lines
193 B
Rust

struct Foo {
f: @mut int,
}
impl Drop for Foo { //~ ERROR cannot implement a destructor on a struct that is not Owned
fn finalize(&self) {
*self.f = 10;
}
}
fn main() { }