rust/src/test/compile-fail/unique-pinned-nocopy.rs

13 lines
186 B
Rust
Raw Normal View History

// error-pattern: copying a noncopyable value
2012-08-15 18:46:55 -07:00
struct r {
2012-06-01 20:21:59 -07:00
let b:bool;
new(b: bool) { self.b = b; }
drop {}
}
fn main() {
let i <- ~r(true);
let j = i;
log(debug, i);
}