Skip to content

Commit 8a4c8ba

Browse files
committed
test: Add test for #979
1 parent d213559 commit 8a4c8ba

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/test/run-pass/issue-979.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
resource r(b: @mutable int) {
2+
*b += 1;
3+
}
4+
5+
fn main() {
6+
let b = @mutable 0;
7+
{
8+
let p = some(r(b));
9+
}
10+
11+
assert *b == 1;
12+
}

0 commit comments

Comments
 (0)