Skip to content

Commit 65d55af

Browse files
committed
test: Make borrowck-assign-to-subfield into a run-pass test, now that
it no longer has boxes in it
1 parent 179c054 commit 65d55af

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/test/compile-fail/borrowck-assign-to-subfield.rs renamed to src/test/run-pass/borrowck-assign-to-subfield.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,17 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[feature(managed_boxes)];
12-
1311
fn main() {
1412
struct A {
1513
a: int,
1614
w: B,
17-
x: @B,
18-
z: @mut B
1915
}
2016
struct B {
2117
a: int
2218
}
2319
let mut p = A {
2420
a: 1,
2521
w: B {a: 1},
26-
x: @B {a: 1},
27-
z: @mut B {a: 1}
2822
};
2923

3024
// even though `x` is not declared as a mutable field,
@@ -33,9 +27,4 @@ fn main() {
3327

3428
// this is true for an interior field too
3529
p.w.a = 2;
36-
37-
// in these cases we pass through a box, so the mut
38-
// of the box is dominant
39-
p.x.a = 2; //~ ERROR cannot assign to immutable field
40-
p.z.a = 2;
4130
}

0 commit comments

Comments
 (0)