2011-09-28 16:24:56 -05:00
|
|
|
// error-pattern: cannot copy pinned type ~~~{y: r}
|
2011-11-15 09:45:14 -06:00
|
|
|
// xfail-test
|
2011-09-27 16:28:20 -05:00
|
|
|
|
|
|
|
resource r(i: @mutable int) {
|
|
|
|
*i = *i + 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let i = @mutable 0;
|
|
|
|
{
|
|
|
|
// Can't do this copy
|
|
|
|
let x = ~~~{y: r(i)};
|
|
|
|
let z = x;
|
|
|
|
}
|
|
|
|
log_err *i;
|
|
|
|
}
|