Skip to content

Commit 61a14f3

Browse files
committed
Add a test for mutable references to unique boxes as function arguments
Issue #409
1 parent 1367f2b commit 61a14f3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
fn f(&i: ~int) {
2+
i = ~200;
3+
}
4+
5+
fn main() {
6+
let i = ~100;
7+
f(i);
8+
assert *i == 200;
9+
}

0 commit comments

Comments
 (0)