Add an xfailed test for bogus deep copying of things containing resources
This commit is contained in:
parent
4bffa5e13a
commit
1097463d96
1 changed files with 16 additions and 0 deletions
16
src/test/compile-fail/pinned-deep-copy.rs
Normal file
16
src/test/compile-fail/pinned-deep-copy.rs
Normal file
|
@ -0,0 +1,16 @@
|
|||
// xfail-test
|
||||
// expected error: mismatched kinds
|
||||
|
||||
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;
|
||||
}
|
Loading…
Reference in a new issue