rust/src/test/compile-fail/copy-a-resource.rs
Tim Chevalier facb5c08c6 Enforce rule that classes with dtors aren't copyable
The test for this is copy-a-resource.
2012-06-01 20:40:35 -07:00

10 lines
173 B
Rust

// error-pattern: copying a noncopyable value
class foo {
let i: int;
new(i:int) { self.i = i; }
drop {}
}
fn main() { let x <- foo(10); let y = x; log(error, x); }