rust/src/test/compile-fail/unique-pinned-nocopy.rs
2012-08-17 10:13:45 -07:00

13 lines
186 B
Rust

// error-pattern: copying a noncopyable value
struct r {
let b:bool;
new(b: bool) { self.b = b; }
drop {}
}
fn main() {
let i <- ~r(true);
let j = i;
log(debug, i);
}