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

16 lines
192 B
Rust
Raw Normal View History

// error-pattern: copying a noncopyable value
2012-08-15 20:46:55 -05:00
struct r {
2012-09-06 21:40:15 -05:00
b:bool,
}
impl r : Drop {
fn finalize() {}
}
fn main() {
let i = move ~r { b: true };
let j = i;
log(debug, i);
}