diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-12-30 17:53:21 -0800 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-01-03 14:02:01 -0800 |
| commit | 65d55afd2f94cb6cd8d66e767a52bc99a1569341 (patch) | |
| tree | 06b14eecc97a494a1acdb066c7f48a036254977d /src | |
| parent | 179c054631c2b7aa6894c327698090e028def4ac (diff) | |
| download | rust-65d55afd2f94cb6cd8d66e767a52bc99a1569341.tar.gz rust-65d55afd2f94cb6cd8d66e767a52bc99a1569341.zip | |
test: Make `borrowck-assign-to-subfield` into a run-pass test, now that
it no longer has boxes in it
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/run-pass/borrowck-assign-to-subfield.rs (renamed from src/test/compile-fail/borrowck-assign-to-subfield.rs) | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/test/compile-fail/borrowck-assign-to-subfield.rs b/src/test/run-pass/borrowck-assign-to-subfield.rs index 40db36787bb..d388f070f8d 100644 --- a/src/test/compile-fail/borrowck-assign-to-subfield.rs +++ b/src/test/run-pass/borrowck-assign-to-subfield.rs @@ -8,14 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[feature(managed_boxes)]; - fn main() { struct A { a: int, w: B, - x: @B, - z: @mut B } struct B { a: int @@ -23,8 +19,6 @@ fn main() { let mut p = A { a: 1, w: B {a: 1}, - x: @B {a: 1}, - z: @mut B {a: 1} }; // even though `x` is not declared as a mutable field, @@ -33,9 +27,4 @@ fn main() { // this is true for an interior field too p.w.a = 2; - - // in these cases we pass through a box, so the mut - // of the box is dominant - p.x.a = 2; //~ ERROR cannot assign to immutable field - p.z.a = 2; } |
