Skip to content

Commit 58c6e07

Browse files
committed
---
yaml --- r: 5515 b: refs/heads/master c: e804352 h: refs/heads/master i: 5513: e4c3bd3 5511: 4fbc450 v: v3
1 parent f6843fa commit 58c6e07

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: c5877450e605e842806140d3bdd93ca931fb60aa
2+
refs/heads/master: e804352de4e44de5ae22c801c00380c4740ba6cd

trunk/src/test/run-pass/unique-swap2.rs renamed to trunk/src/test/compile-fail/unique-swap2.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
// xfail-test
2-
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.
1+
// error-pattern: mismatched kinds
62

73
resource r(i: @mutable int) {
84
*i += 1;
@@ -14,6 +10,8 @@ fn test1() {
1410
{
1511
let x = ~r(i);
1612
let y = ~r(j);
13+
// Unique boxes containing resources are lowered to pinned kinds,
14+
// which can't be swapped
1715
x <-> y;
1816
assert ***x == 200;
1917
assert ***y == 100;

0 commit comments

Comments
 (0)