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 cc1a2f2 commit b3933b8Copy full SHA for b3933b8
src/test/run-pass/issue-2548.rs
@@ -0,0 +1,27 @@
1
+// A test case for #2548.
2
+
3
+// xfail-test
4
5
+struct foo {
6
+ x: @mut int;
7
8
+ new(x: @mut int) { self.x = x; }
9
10
+ drop {
11
+ io::println("Goodbye, World!");
12
+ *self.x += 1;
13
+ }
14
+}
15
16
+fn main() {
17
+ let x = @mut 0;
18
19
+ {
20
+ let mut res = foo(x);
21
22
+ let mut v = ~[mut];
23
+ v <- ~[mut res] + v;
24
25
26
+ assert *x == 1;
27
0 commit comments