We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6843fa commit 58c6e07Copy full SHA for 58c6e07
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: c5877450e605e842806140d3bdd93ca931fb60aa
+refs/heads/master: e804352de4e44de5ae22c801c00380c4740ba6cd
trunk/src/test/run-pass/unique-swap2.rs renamed to trunk/src/test/compile-fail/unique-swap2.rs
@@ -1,8 +1,4 @@
-// xfail-test
-
3
-// This no longer works because ~r() is lowered to a pinned type
4
-// (which can't be swapped). Should probably be a compile-fail
5
-// test.
+// error-pattern: mismatched kinds
6
7
resource r(i: @mutable int) {
8
*i += 1;
@@ -14,6 +10,8 @@ fn test1() {
14
10
{
15
11
let x = ~r(i);
16
12
let y = ~r(j);
13
+ // Unique boxes containing resources are lowered to pinned kinds,
+ // which can't be swapped
17
x <-> y;
18
assert ***x == 200;
19
assert ***y == 100;
0 commit comments