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

17 lines
293 B
Rust
Raw Normal View History

// xfail-test #2587
// error-pattern: copying a noncopyable value
2012-08-15 18:46:55 -07:00
struct r {
2012-06-06 14:58:41 -07:00
let i:int;
new(i:int) {self.i = i;}
2012-06-01 20:21:59 -07:00
drop {}
}
fn main() {
2012-06-01 20:21:59 -07:00
// This can't make sense as it would copy the classes
let i = move ~[r(0)];
let j = move ~[r(1)];
let k = i + j;
log(debug, j);
}