rust/src/test/compile-fail/vec-res-add.rs

15 lines
239 B
Rust
Raw Normal View History

// error-pattern: copying a noncopyable value
2012-06-01 20:21:59 -07:00
class r {
new(_i:int) {}
drop {}
}
fn main() {
2012-06-01 20:21:59 -07:00
// This can't make sense as it would copy the classes
let i <- [r(0)];
let j <- [r(1)];
let k = i + j;
log(debug, j);
}