2011-11-18 05:39:20 -06:00
|
|
|
// error-pattern: copying a noncopyable value
|
2011-09-28 16:37:28 -05:00
|
|
|
|
2011-11-18 05:39:20 -06:00
|
|
|
resource r(_i: int) { }
|
2011-09-28 16:37:28 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
// This can't make sense as it would copy the resources
|
|
|
|
let i <- [r(0)];
|
|
|
|
let j <- [r(1)];
|
|
|
|
let k = i + j;
|
2011-12-22 16:42:52 -06:00
|
|
|
log_full(core::debug, j);
|
2011-11-18 05:39:20 -06:00
|
|
|
}
|