facb5c08c6
The test for this is copy-a-resource.
10 lines
173 B
Rust
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); }
|