2011-11-18 12:39:20 +01:00
|
|
|
// error-pattern: copying a noncopyable value
|
2011-09-28 14:37:28 -07:00
|
|
|
|
2011-11-18 12:39:20 +01:00
|
|
|
resource r(_i: int) { }
|
2011-09-28 14:37:28 -07: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 17:53:53 -08:00
|
|
|
log(debug, j);
|
2011-11-18 12:39:20 +01:00
|
|
|
}
|