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 20:46:55 -05:00
struct r {
2012-06-01 22:21:59 -05:00
let b:bool;
new(b: bool) { self.b = b; }
drop {}
}
fn main() {
let i <- ~r(true);
let j = i;
log(debug, i);
}