Skip to content

Commit 1097463

Browse files
committed
Add an xfailed test for bogus deep copying of things containing resources
1 parent 4bffa5e commit 1097463

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// xfail-test
2+
// expected error: mismatched kinds
3+
4+
resource r(i: @mutable int) {
5+
*i = *i + 1;
6+
}
7+
8+
fn main() {
9+
let i = @mutable 0;
10+
{
11+
// Can't do this copy
12+
let x = ~~~{y: r(i)};
13+
let z = x;
14+
}
15+
log_err *i;
16+
}

0 commit comments

Comments
 (0)