about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLuqman Aden <laden@csclub.uwaterloo.ca>2013-02-21 15:19:40 -0800
committerLuqman Aden <laden@csclub.uwaterloo.ca>2013-02-21 15:19:40 -0800
commit9ea6a496964e8f380f257cfd281b364f3337176b (patch)
tree07a1e1e45770927e63f5b1d51758720d43b31d1f
parente0767bf24f7a526430472290825ebd9158cb1dcc (diff)
downloadrust-9ea6a496964e8f380f257cfd281b364f3337176b.tar.gz
rust-9ea6a496964e8f380f257cfd281b364f3337176b.zip
Remove the last bits of structural records from tests/rustc/rusti/rustpkg.
-rw-r--r--src/compiletest/common.rs4
-rw-r--r--src/compiletest/compiletest.rc35
-rw-r--r--src/librustc/middle/lint.rs32
-rw-r--r--src/librustc/middle/ty.rs8
-rw-r--r--src/librusti/rusti.rc1
-rw-r--r--src/librusti/wrapper.rs1
-rw-r--r--src/librustpkg/rustpkg.rc2
-rw-r--r--src/libsyntax/parse/parser.rs2
-rw-r--r--src/test/bench/pingpong.rs2
-rw-r--r--src/test/compile-fail/borrowck-assign-comp.rs16
-rw-r--r--src/test/compile-fail/borrowck-assign-to-subfield.rs22
-rw-r--r--src/test/compile-fail/borrowck-imm-ref-to-mut-rec-field-issue-3162-b.rs6
-rw-r--r--src/test/compile-fail/borrowck-imm-ref-to-mut-rec-field-issue-3162.rs5
-rw-r--r--src/test/compile-fail/borrowck-loan-rcvr.rs8
-rw-r--r--src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs8
-rw-r--r--src/test/compile-fail/borrowck-uniq-via-lend.rs8
-rw-r--r--src/test/compile-fail/issue-1896-1.rs4
-rw-r--r--src/test/compile-fail/issue-3033.rs16
-rw-r--r--src/test/compile-fail/kindck-owned-trait-scoped.rs9
-rw-r--r--src/test/compile-fail/liveness-init-in-fru.rs4
-rw-r--r--src/test/compile-fail/mutable-huh-field-assign.rs20
-rw-r--r--src/test/compile-fail/non-const.rs9
-rw-r--r--src/test/compile-fail/obsolete-syntax.rs5
-rw-r--r--src/test/compile-fail/pinned-deep-copy.rs3
-rw-r--r--src/test/compile-fail/record-with-resource.rs33
-rw-r--r--src/test/compile-fail/regions-trait-1.rs8
-rw-r--r--src/test/compile-fail/regions-trait-2.rs8
-rw-r--r--src/test/compile-fail/tps-invariant-enum.rs9
-rw-r--r--src/test/compile-fail/tps-invariant-trait.rs8
-rw-r--r--src/test/run-pass/pipe-detect-term.rs2
-rw-r--r--src/test/run-pass/pipe-peek.rs2
-rw-r--r--src/test/run-pass/pipe-pingpong-bounded.rs15
-rw-r--r--src/test/run-pass/pipe-pingpong-proto.rs2
-rw-r--r--src/test/run-pass/pipe-presentation-examples.rs2
-rw-r--r--src/test/run-pass/pipe-select.rs2
-rw-r--r--src/test/run-pass/pipe-sleep.rs2
36 files changed, 129 insertions, 194 deletions
diff --git a/src/compiletest/common.rs b/src/compiletest/common.rs
index 679f9ab93bf..0facf9d63c3 100644
--- a/src/compiletest/common.rs
+++ b/src/compiletest/common.rs
@@ -21,7 +21,7 @@ pub enum mode {
     mode_debug_info,
 }
 
-pub type config = {
+pub struct config {
     // The library paths required for running the compiler
     compile_lib_path: ~str,
 
@@ -68,4 +68,4 @@ pub type config = {
     // Explain what's going on
     verbose: bool
 
-};
+}
diff --git a/src/compiletest/compiletest.rc b/src/compiletest/compiletest.rc
index 5ad616963fa..6748edb9dbd 100644
--- a/src/compiletest/compiletest.rc
+++ b/src/compiletest/compiletest.rc
@@ -11,7 +11,6 @@
 #[crate_type = "bin"];
 
 #[no_core];
-#[legacy_records];
 
 #[allow(vecs_implicitly_copyable)];
 #[allow(non_camel_case_types)];
@@ -77,26 +76,28 @@ pub fn parse_config(args: ~[~str]) -> config {
         Path(getopts::opt_str(m, nm))
     }
 
-    return {compile_lib_path: getopts::opt_str(matches, ~"compile-lib-path"),
-         run_lib_path: getopts::opt_str(matches, ~"run-lib-path"),
-         rustc_path: opt_path(matches, ~"rustc-path"),
-         src_base: opt_path(matches, ~"src-base"),
-         build_base: opt_path(matches, ~"build-base"),
-         aux_base: opt_path(matches, ~"aux-base"),
-         stage_id: getopts::opt_str(matches, ~"stage-id"),
-         mode: str_mode(getopts::opt_str(matches, ~"mode")),
-         run_ignored: getopts::opt_present(matches, ~"ignored"),
-         filter:
+    config {
+        compile_lib_path: getopts::opt_str(matches, ~"compile-lib-path"),
+        run_lib_path: getopts::opt_str(matches, ~"run-lib-path"),
+        rustc_path: opt_path(matches, ~"rustc-path"),
+        src_base: opt_path(matches, ~"src-base"),
+        build_base: opt_path(matches, ~"build-base"),
+        aux_base: opt_path(matches, ~"aux-base"),
+        stage_id: getopts::opt_str(matches, ~"stage-id"),
+        mode: str_mode(getopts::opt_str(matches, ~"mode")),
+        run_ignored: getopts::opt_present(matches, ~"ignored"),
+        filter:
              if vec::len(matches.free) > 0u {
                  option::Some(matches.free[0])
              } else { option::None },
-         logfile: option::map(&getopts::opt_maybe_str(matches,
+        logfile: option::map(&getopts::opt_maybe_str(matches,
                                                      ~"logfile"),
-                              |s| Path(*s)),
-         runtool: getopts::opt_maybe_str(matches, ~"runtool"),
-         rustcflags: getopts::opt_maybe_str(matches, ~"rustcflags"),
-         jit: getopts::opt_present(matches, ~"jit"),
-         verbose: getopts::opt_present(matches, ~"verbose")};
+                             |s| Path(*s)),
+        runtool: getopts::opt_maybe_str(matches, ~"runtool"),
+        rustcflags: getopts::opt_maybe_str(matches, ~"rustcflags"),
+        jit: getopts::opt_present(matches, ~"jit"),
+        verbose: getopts::opt_present(matches, ~"verbose")
+    }
 }
 
 pub fn log_config(config: config) {
diff --git a/src/librustc/middle/lint.rs b/src/librustc/middle/lint.rs
index a88f478dd4b..0a06808b633 100644
--- a/src/librustc/middle/lint.rs
+++ b/src/librustc/middle/lint.rs
@@ -706,23 +706,21 @@ fn check_item_deprecated_self(cx: ty::ctxt, item: @ast::item) {
 }
 
 fn check_item_structural_records(cx: ty::ctxt, it: @ast::item) {
-    if !cx.legacy_records {
-        let visit = item_stopping_visitor(
-            visit::mk_simple_visitor(@visit::SimpleVisitor {
-                visit_expr: |e: @ast::expr| {
-                    match e.node {
-                        ast::expr_rec(*) =>
-                            cx.sess.span_lint(
-                                structural_records, e.id, it.id,
-                                e.span,
-                                ~"structural records are deprecated"),
-                        _ => ()
-                    }
-                },
-                .. *visit::default_simple_visitor()
-            }));
-        visit::visit_item(it, (), visit);
-    }
+    let visit = item_stopping_visitor(
+        visit::mk_simple_visitor(@visit::SimpleVisitor {
+            visit_expr: |e: @ast::expr| {
+                match e.node {
+                    ast::expr_rec(*) =>
+                        cx.sess.span_lint(
+                            structural_records, e.id, it.id,
+                            e.span,
+                            ~"structural records are deprecated"),
+                    _ => ()
+                }
+            },
+            .. *visit::default_simple_visitor()
+        }));
+    visit::visit_item(it, (), visit);
 }
 
 fn check_item_ctypes(cx: ty::ctxt, it: @ast::item) {
diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs
index 413ec9fcdf3..2ed36ade7fd 100644
--- a/src/librustc/middle/ty.rs
+++ b/src/librustc/middle/ty.rs
@@ -233,7 +233,6 @@ struct ctxt_ {
     mut next_id: uint,
     vecs_implicitly_copyable: bool,
     legacy_modes: bool,
-    legacy_records: bool,
     cstore: @mut metadata::cstore::CStore,
     sess: session::Session,
     def_map: resolve::DefMap,
@@ -789,16 +788,10 @@ pub fn mk_ctxt(s: session::Session,
                crate: @ast::crate)
             -> ctxt {
     let mut legacy_modes = false;
-    let mut legacy_records = false;
     for crate.node.attrs.each |attribute| {
         match attribute.node.value.node {
             ast::meta_word(w) if *w == ~"legacy_modes" => {
                 legacy_modes = true;
-                if legacy_records { break; }
-            }
-            ast::meta_word(w) if *w == ~"legacy_records" => {
-                legacy_records = true;
-                if legacy_modes { break; }
             }
             _ => {}
         }
@@ -814,7 +807,6 @@ pub fn mk_ctxt(s: session::Session,
         mut next_id: 0u,
         vecs_implicitly_copyable: vecs_implicitly_copyable,
         legacy_modes: legacy_modes,
-        legacy_records: legacy_records,
         cstore: s.cstore,
         sess: s,
         def_map: dm,
diff --git a/src/librusti/rusti.rc b/src/librusti/rusti.rc
index 257c651efc6..0fe533e3dd9 100644
--- a/src/librusti/rusti.rc
+++ b/src/librusti/rusti.rc
@@ -17,7 +17,6 @@
 
 #[crate_type = "lib"];
 
-#[legacy_records];
 #[no_core];
 
 #[allow(vecs_implicitly_copyable,
diff --git a/src/librusti/wrapper.rs b/src/librusti/wrapper.rs
index aebc5e77c29..7766602dd89 100644
--- a/src/librusti/wrapper.rs
+++ b/src/librusti/wrapper.rs
@@ -16,7 +16,6 @@
 #[allow(non_implicitly_copyable_typarams)];
 #[allow(owned_heap_memory)];
 #[allow(path_statement)];
-#[allow(structural_records)];
 #[allow(unrecognized_lint)];
 #[allow(unused_imports)];
 #[allow(vecs_implicitly_copyable)];
diff --git a/src/librustpkg/rustpkg.rc b/src/librustpkg/rustpkg.rc
index f4393425e18..78db7dccb86 100644
--- a/src/librustpkg/rustpkg.rc
+++ b/src/librustpkg/rustpkg.rc
@@ -20,8 +20,6 @@
 #[allow(vecs_implicitly_copyable,
         non_implicitly_copyable_typarams)];
 
-#[legacy_records];
-
 extern mod core(vers = "0.6");
 extern mod std(vers = "0.6");
 extern mod rustc(vers = "0.6");
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index d0c857d363b..871ba5e8401 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1926,7 +1926,7 @@ pub impl Parser {
             fields.push(self.parse_field(token::COLON));
         }
         self.expect(token::RBRACE);
-        //self.warn(~"REC");
+        self.warn(~"REC");
         return expr_rec(fields, base);
     }
 
diff --git a/src/test/bench/pingpong.rs b/src/test/bench/pingpong.rs
index 16f44b88793..670e7644062 100644
--- a/src/test/bench/pingpong.rs
+++ b/src/test/bench/pingpong.rs
@@ -10,8 +10,6 @@
 
 // Compare bounded and unbounded protocol performance.
 
-#[allow(structural_records)]; // Pipes
-// Until a snapshot
 // xfail-pretty
  
 extern mod std;
diff --git a/src/test/compile-fail/borrowck-assign-comp.rs b/src/test/compile-fail/borrowck-assign-comp.rs
index e4cdf2d7c69..f5597859433 100644
--- a/src/test/compile-fail/borrowck-assign-comp.rs
+++ b/src/test/compile-fail/borrowck-assign-comp.rs
@@ -8,10 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-type point = { x: int, y: int };
+struct point {x: int, mut y: int }
 
 fn a() {
-    let mut p = {x: 3, y: 4};
+    let mut p = point {x: 3, y: 4};
     let _q = &p; //~ NOTE loan of mutable local variable granted here
 
     // This assignment is illegal because the field x is not
@@ -21,11 +21,11 @@ fn a() {
 }
 
 fn b() {
-    let mut p = {x: 3, mut y: 4};
-    let _q = &p;
-
+    let mut p = point {x: 3, mut y: 4};
     // This assignment is legal because `y` is inherently mutable (and
     // hence &_q.y is &mut int).
+    let _q = &p;
+
     p.y = 5;
 }
 
@@ -33,9 +33,9 @@ fn c() {
     // this is sort of the opposite.  We take a loan to the interior of `p`
     // and then try to overwrite `p` as a whole.
 
-    let mut p = {x: 3, mut y: 4};
+    let mut p = point {x: 3, mut y: 4};
     let _q = &p.y; //~ NOTE loan of mutable local variable granted here
-    p = {x: 5, mut y: 7};//~ ERROR assigning to mutable local variable prohibited due to outstanding loan
+    p = point {x: 5, mut y: 7};//~ ERROR assigning to mutable local variable prohibited due to outstanding loan
     copy p;
 }
 
@@ -43,7 +43,7 @@ fn d() {
     // just for completeness's sake, the easy case, where we take the
     // address of a subcomponent and then modify that subcomponent:
 
-    let mut p = {x: 3, mut y: 4};
+    let mut p = point {x: 3, mut y: 4};
     let _q = &p.y; //~ NOTE loan of mutable field granted here
     p.y = 5; //~ ERROR assigning to mutable field prohibited due to outstanding loan
     copy p;
diff --git a/src/test/compile-fail/borrowck-assign-to-subfield.rs b/src/test/compile-fail/borrowck-assign-to-subfield.rs
index 9e90995c33a..736e950cd82 100644
--- a/src/test/compile-fail/borrowck-assign-to-subfield.rs
+++ b/src/test/compile-fail/borrowck-assign-to-subfield.rs
@@ -9,11 +9,23 @@
 // except according to those terms.
 
 fn main() {
-    let mut p = {a: 1,
-                 w: {a: 1},
-                 x: @{a: 1},
-                 y: @const {a: 1},
-                 z: @mut{a: 1}};
+    struct A {
+        a: int,
+        w: B,
+        x: @B,
+        y: @const B,
+        z: @mut B
+    }
+    struct B {
+        a: int
+    }
+    let mut p = A {
+        a: 1,
+        w: B {a: 1},
+        x: @B {a: 1},
+        y: @const B {a: 1},
+        z: @mut B {a: 1}
+    };
 
     // even though `x` is not declared as a mutable field,
     // `p` as a whole is mutable, so it can be modified.
diff --git a/src/test/compile-fail/borrowck-imm-ref-to-mut-rec-field-issue-3162-b.rs b/src/test/compile-fail/borrowck-imm-ref-to-mut-rec-field-issue-3162-b.rs
index f808f9ced32..64baf3a9457 100644
--- a/src/test/compile-fail/borrowck-imm-ref-to-mut-rec-field-issue-3162-b.rs
+++ b/src/test/compile-fail/borrowck-imm-ref-to-mut-rec-field-issue-3162-b.rs
@@ -12,8 +12,12 @@ fn each<T>(x: &[T], op: fn(elem: &T) -> bool) {
     uint::range(0, x.len(), |i| op(&x[i]));
 }
 
+struct A {
+    mut a: int
+}
+
 fn main() {
-    let x = [{mut a: 0}];
+    let x = [A {mut a: 0}];
     for each(x) |y| {
         let z = &y.a; //~ ERROR illegal borrow unless pure
         x[0].a = 10; //~ NOTE impure due to assigning to mutable field
diff --git a/src/test/compile-fail/borrowck-imm-ref-to-mut-rec-field-issue-3162.rs b/src/test/compile-fail/borrowck-imm-ref-to-mut-rec-field-issue-3162.rs
index 17bd4ec1e88..a14fd18c7d5 100644
--- a/src/test/compile-fail/borrowck-imm-ref-to-mut-rec-field-issue-3162.rs
+++ b/src/test/compile-fail/borrowck-imm-ref-to-mut-rec-field-issue-3162.rs
@@ -13,7 +13,10 @@ fn each<T>(x: &[T], op: fn(elem: &T) -> bool) {
 }
 
 fn main() {
-    let x = ~[{mut a: 0}];
+    struct A {
+        mut a: int
+    }
+    let x = ~[A {mut a: 0}];
     for each(x) |y| {
         let z = &y.a; //~ ERROR illegal borrow unless pure
         x[0].a = 10; //~ NOTE impure due to assigning to mutable field
diff --git a/src/test/compile-fail/borrowck-loan-rcvr.rs b/src/test/compile-fail/borrowck-loan-rcvr.rs
index 97b46c71492..bd4428dc930 100644
--- a/src/test/compile-fail/borrowck-loan-rcvr.rs
+++ b/src/test/compile-fail/borrowck-loan-rcvr.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-type point = { x: int, y: int };
+struct point { x: int, y: int }
 
 trait methods {
     fn impurem();
@@ -27,7 +27,7 @@ impl methods for point {
 }
 
 fn a() {
-    let mut p = {x: 3, y: 4};
+    let mut p = point {x: 3, y: 4};
 
     // Here: it's ok to call even though receiver is mutable, because we
     // can loan it out.
@@ -41,7 +41,7 @@ fn a() {
 }
 
 fn b() {
-    let mut p = {x: 3, y: 4};
+    let mut p = point {x: 3, y: 4};
 
     // Here I create an outstanding loan and check that we get conflicts:
 
@@ -56,7 +56,7 @@ fn b() {
 
 fn c() {
     // Loaning @mut as & is considered legal due to dynamic checks:
-    let q = @mut {x: 3, y: 4};
+    let q = @mut point {x: 3, y: 4};
     q.purem();
     q.impurem();
 }
diff --git a/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs b/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs
index 4d87bbf6c72..e7cbab41079 100644
--- a/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs
+++ b/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs
@@ -8,12 +8,16 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+struct node_ {
+    mut a: ~cycle
+}
+
 enum cycle {
-    node({mut a: ~cycle}),
+    node(node_),
     empty
 }
 fn main() {
-    let x = ~node({mut a: ~empty});
+    let x = ~node(node_ {mut a: ~empty});
     // Create a cycle!
     match *x { //~ NOTE loan of immutable local variable granted here
       node(ref y) => {
diff --git a/src/test/compile-fail/borrowck-uniq-via-lend.rs b/src/test/compile-fail/borrowck-uniq-via-lend.rs
index d61731ccc45..ee96237a26c 100644
--- a/src/test/compile-fail/borrowck-uniq-via-lend.rs
+++ b/src/test/compile-fail/borrowck-uniq-via-lend.rs
@@ -16,12 +16,16 @@ fn local() {
 }
 
 fn local_rec() {
-    let mut v = {f: ~3};
+    struct F { f: ~int }
+    let mut v = F {f: ~3};
     borrow(v.f);
 }
 
 fn local_recs() {
-    let mut v = {f: {g: {h: ~3}}};
+    struct F { f: G }
+    struct G { g: H }
+    struct H { h: ~int }
+    let mut v = F {f: G {g: H {h: ~3}}};
     borrow(v.f.g.h);
 }
 
diff --git a/src/test/compile-fail/issue-1896-1.rs b/src/test/compile-fail/issue-1896-1.rs
index 5def792558a..2be04929dc6 100644
--- a/src/test/compile-fail/issue-1896-1.rs
+++ b/src/test/compile-fail/issue-1896-1.rs
@@ -8,10 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-type boxedFn = { theFn: fn () -> uint };
+struct boxedFn { theFn: fn~() -> uint }
 
 fn createClosure (closedUint: uint) -> boxedFn {
-    { theFn: fn@ () -> uint { closedUint } } //~ ERROR mismatched types
+    boxedFn {theFn: fn@ () -> uint { closedUint }} //~ ERROR mismatched types
 }
 
 fn main () {
diff --git a/src/test/compile-fail/issue-3033.rs b/src/test/compile-fail/issue-3033.rs
deleted file mode 100644
index 1d54e034901..00000000000
--- a/src/test/compile-fail/issue-3033.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-type cat = {cat_name: ~str, cat_name: int};  //~ ERROR Duplicate field name cat_name
-
-fn main()
-{
-  io::println(int::str({x: 1, x: 2}.x)); //~ ERROR Duplicate field name x
-}
diff --git a/src/test/compile-fail/kindck-owned-trait-scoped.rs b/src/test/compile-fail/kindck-owned-trait-scoped.rs
index b2cef943528..f11703ecf02 100644
--- a/src/test/compile-fail/kindck-owned-trait-scoped.rs
+++ b/src/test/compile-fail/kindck-owned-trait-scoped.rs
@@ -25,20 +25,23 @@ fn to_foo<T:Copy>(t: T) {
     // the type of foo includes a region which will be resolved to
     // the fn body itself.
     let v = &3;
-    let x = {f:t} as foo;
+    struct F<T> { f: T }
+    let x = F {f:t} as foo;
     assert x.foo(v) == 3;
 }
 
 fn to_foo_2<T:Copy>(t: T) -> foo {
     // Not OK---T may contain borrowed ptrs and it is going to escape
     // as part of the returned foo value
-    {f:t} as foo //~ ERROR value may contain borrowed pointers; use `&static` bound
+    struct F<T> { f: T }
+    F {f:t} as foo //~ ERROR value may contain borrowed pointers; use `&static` bound
 }
 
 fn to_foo_3<T:Copy + &static>(t: T) -> foo {
     // OK---T may escape as part of the returned foo value, but it is
     // owned and hence does not contain borrowed ptrs
-    {f:t} as foo
+    struct F<T> { f: T }
+    F {f:t} as foo
 }
 
 fn main() {
diff --git a/src/test/compile-fail/liveness-init-in-fru.rs b/src/test/compile-fail/liveness-init-in-fru.rs
index f0ab71d0c41..1bd42c1cd32 100644
--- a/src/test/compile-fail/liveness-init-in-fru.rs
+++ b/src/test/compile-fail/liveness-init-in-fru.rs
@@ -10,10 +10,10 @@
 // except according to those terms.
 
 
-type point = {x: int, y: int};
+struct point {x: int, y: int}
 
 fn main() {
     let mut origin: point;
-    origin = {x: 10,.. origin}; //~ ERROR use of possibly uninitialized variable: `origin`
+    origin = point {x: 10,.. origin}; //~ ERROR use of possibly uninitialized variable: `origin`
     copy origin;
 }
diff --git a/src/test/compile-fail/mutable-huh-field-assign.rs b/src/test/compile-fail/mutable-huh-field-assign.rs
deleted file mode 100644
index f66d52499fe..00000000000
--- a/src/test/compile-fail/mutable-huh-field-assign.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    fn f(&&v: {const field: int}) {
-        // This shouldn't be possible
-        v.field = 1 //~ ERROR assigning to const field
-    }
-
-    let v = {field: 0};
-
-    f(v);
-}
diff --git a/src/test/compile-fail/non-const.rs b/src/test/compile-fail/non-const.rs
index 43c91490a96..3b6522c308d 100644
--- a/src/test/compile-fail/non-const.rs
+++ b/src/test/compile-fail/non-const.rs
@@ -41,8 +41,11 @@ fn r2(x:@mut int) -> r2 {
 }
 
 fn main() {
-    foo({f: 3});
-    foo({mut f: 3}); //~ ERROR does not fulfill `Const`
+    struct A<T> { f: T }
+    struct B<T> { mut f: T }
+
+    foo(A {f: 3});
+    foo(B {mut f: 3}); //~ ERROR does not fulfill `Const`
     foo(~[1]);
     foo(~[mut 1]); //~ ERROR does not fulfill `Const`
     foo(~1);
@@ -51,5 +54,5 @@ fn main() {
     foo(@mut 1); //~ ERROR does not fulfill `Const`
     foo(r(1)); // this is okay now.
     foo(r2(@mut 1)); //~ ERROR does not fulfill `Const`
-    foo({f: {mut f: 1}}); //~ ERROR does not fulfill `Const`
+    foo(A {f: B {mut f: 1}}); //~ ERROR does not fulfill `Const`
 }
diff --git a/src/test/compile-fail/obsolete-syntax.rs b/src/test/compile-fail/obsolete-syntax.rs
index ac873238bfc..cd3be9dc3d9 100644
--- a/src/test/compile-fail/obsolete-syntax.rs
+++ b/src/test/compile-fail/obsolete-syntax.rs
@@ -51,11 +51,6 @@ fn obsolete_with() {
     //~^ ERROR obsolete syntax: with
     let c = S { foo: (), with a };
     //~^ ERROR obsolete syntax: with
-    let a = { foo: (), bar: () };
-    let b = { foo: () with a };
-    //~^ ERROR obsolete syntax: with
-    let c = { foo: (), with a };
-    //~^ ERROR obsolete syntax: with
 }
 
 fn obsolete_moves() {
diff --git a/src/test/compile-fail/pinned-deep-copy.rs b/src/test/compile-fail/pinned-deep-copy.rs
index 43515e26529..03ba317e731 100644
--- a/src/test/compile-fail/pinned-deep-copy.rs
+++ b/src/test/compile-fail/pinned-deep-copy.rs
@@ -27,8 +27,9 @@ fn r(i: @mut int) -> r {
 fn main() {
     let i = @mut 0;
     {
+        struct A { y: r }
         // Can't do this copy
-        let x = ~~~{y: r(i)};
+        let x = ~~~A {y: r(i)};
         let _z = copy x; //~ ERROR copying a value of non-copyable type
         log(debug, x);
     }
diff --git a/src/test/compile-fail/record-with-resource.rs b/src/test/compile-fail/record-with-resource.rs
deleted file mode 100644
index 2a1db52d733..00000000000
--- a/src/test/compile-fail/record-with-resource.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct my_resource {
-  x: int,
-}
-
-impl Drop for my_resource {
-    fn finalize(&self) {
-        log(error, self.x);
-    }
-}
-
-fn my_resource(x: int) -> my_resource {
-    my_resource {
-        x: x
-    }
-}
-
-fn main() {
-    {
-        let a = {x: 0, y: my_resource(20)};
-        let b = {x: 2,.. copy a}; //~ ERROR copying a value of non-copyable type
-        log(error, (a, b));
-    }
-}
diff --git a/src/test/compile-fail/regions-trait-1.rs b/src/test/compile-fail/regions-trait-1.rs
index de31c64328f..4a78fdf9714 100644
--- a/src/test/compile-fail/regions-trait-1.rs
+++ b/src/test/compile-fail/regions-trait-1.rs
@@ -8,14 +8,14 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-type ctxt = { v: uint };
+struct ctxt { v: uint }
 
 trait get_ctxt {
     // Here the `&` is bound in the method definition:
     fn get_ctxt() -> &ctxt;
 }
 
-type has_ctxt = { c: &ctxt };
+struct has_ctxt { c: &ctxt }
 
 impl get_ctxt for has_ctxt {
 
@@ -32,7 +32,7 @@ fn get_v(gc: get_ctxt) -> uint {
 }
 
 fn main() {
-    let ctxt = { v: 22u };
-    let hc = { c: &ctxt };
+    let ctxt = ctxt { v: 22u };
+    let hc = has_ctxt { c: &ctxt };
     assert get_v(hc as get_ctxt) == 22u;
 }
diff --git a/src/test/compile-fail/regions-trait-2.rs b/src/test/compile-fail/regions-trait-2.rs
index f19417425aa..2cb1f9deb49 100644
--- a/src/test/compile-fail/regions-trait-2.rs
+++ b/src/test/compile-fail/regions-trait-2.rs
@@ -8,21 +8,21 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-type ctxt = { v: uint };
+struct ctxt { v: uint }
 
 trait get_ctxt {
     fn get_ctxt() -> &self/ctxt;
 }
 
-type has_ctxt = { c: &ctxt };
+struct has_ctxt { c: &ctxt }
 
 impl get_ctxt for has_ctxt {
     fn get_ctxt() -> &self/ctxt { self.c }
 }
 
 fn make_gc() -> get_ctxt  {
-    let ctxt = { v: 22u };
-    let hc = { c: &ctxt }; //~ ERROR illegal borrow
+    let ctxt = ctxt { v: 22u };
+    let hc = has_ctxt { c: &ctxt }; //~ ERROR illegal borrow
     return hc as get_ctxt;
 }
 
diff --git a/src/test/compile-fail/tps-invariant-enum.rs b/src/test/compile-fail/tps-invariant-enum.rs
index 1514dc5fd54..ead155320b8 100644
--- a/src/test/compile-fail/tps-invariant-enum.rs
+++ b/src/test/compile-fail/tps-invariant-enum.rs
@@ -8,21 +8,22 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-enum box_impl<T> = {
+struct box<T> {
     mut f: T
-};
+}
+enum box_impl<T> = box<T>;
 
 fn set_box_impl<T>(b: box_impl<@const T>, v: @const T) {
     b.f = v;
 }
 
 fn main() {
-    let b = box_impl::<@int>({mut f: @3});
+    let b = box_impl::<@int>(box::<@int> {mut f: @3});
     set_box_impl(b, @mut 5);
     //~^ ERROR values differ in mutability
 
     // No error when type of parameter actually IS @const int
     let x: @const int = @3; // only way I could find to upcast
-    let b = box_impl::<@const int>({mut f: x});
+    let b = box_impl::<@const int>(box::<@const int>{mut f: x});
     set_box_impl(b, @mut 5);
 }
diff --git a/src/test/compile-fail/tps-invariant-trait.rs b/src/test/compile-fail/tps-invariant-trait.rs
index f2e030b259e..adf82232898 100644
--- a/src/test/compile-fail/tps-invariant-trait.rs
+++ b/src/test/compile-fail/tps-invariant-trait.rs
@@ -13,9 +13,11 @@ trait box_trait<T> {
     fn set(t: T);
 }
 
-enum box_impl<T> = {
+struct box<T> {
     mut f: T
-};
+}
+
+enum box_impl<T> = box<T>;
 
 impl<T:Copy> box_trait<T> for box_impl<T> {
     fn get() -> T { return self.f; }
@@ -31,7 +33,7 @@ fn set_box_impl<T>(b: box_impl<@const T>, v: @const T) {
 }
 
 fn main() {
-    let b = box_impl::<@int>({mut f: @3});
+    let b = box_impl::<@int>(box::<@int> {mut f: @3});
     set_box_trait(b as box_trait::<@int>, @mut 5);
     //~^ ERROR values differ in mutability
     set_box_impl(b, @mut 5);
diff --git a/src/test/run-pass/pipe-detect-term.rs b/src/test/run-pass/pipe-detect-term.rs
index 2d765423988..edf3930e673 100644
--- a/src/test/run-pass/pipe-detect-term.rs
+++ b/src/test/run-pass/pipe-detect-term.rs
@@ -14,8 +14,6 @@
 
 // xfail-win32
 
-#[legacy_records];
-
 extern mod std;
 use std::timer::sleep;
 use std::uv;
diff --git a/src/test/run-pass/pipe-peek.rs b/src/test/run-pass/pipe-peek.rs
index baa5ba5bf00..79ce20a06fd 100644
--- a/src/test/run-pass/pipe-peek.rs
+++ b/src/test/run-pass/pipe-peek.rs
@@ -10,8 +10,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[legacy_records];
-
 extern mod std;
 use std::timer::sleep;
 use std::uv;
diff --git a/src/test/run-pass/pipe-pingpong-bounded.rs b/src/test/run-pass/pipe-pingpong-bounded.rs
index b13b262e864..f08eaf973b2 100644
--- a/src/test/run-pass/pipe-pingpong-bounded.rs
+++ b/src/test/run-pass/pipe-pingpong-bounded.rs
@@ -17,21 +17,20 @@
 
 // This was generated initially by the pipe compiler, but it's been
 // modified in hopefully straightforward ways.
-#[legacy_records];
 
 mod pingpong {
     use core::pipes::*;
     use core::ptr;
 
-    pub type packets = {
+    pub struct Packets {
         ping: Packet<ping>,
         pong: Packet<pong>,
-    };
+    }
 
     pub fn init() -> (client::ping, server::ping) {
         let buffer = ~Buffer {
             header: BufferHeader(),
-            data: {
+            data: Packets {
                 ping: mk_packet::<ping>(),
                 pong: mk_packet::<pong>()
             }
@@ -59,16 +58,16 @@ mod pingpong {
             }
         }
         pub type ping = pipes::SendPacketBuffered<::pingpong::ping,
-                                                  ::pingpong::packets>;
+                                                  ::pingpong::Packets>;
         pub type pong = pipes::RecvPacketBuffered<::pingpong::pong,
-                                                  ::pingpong::packets>;
+                                                  ::pingpong::Packets>;
     }
     pub mod server {
         use core::pipes::*;
         use core::ptr;
 
         pub type ping = pipes::RecvPacketBuffered<::pingpong::ping,
-        ::pingpong::packets>;
+        ::pingpong::Packets>;
         pub fn pong(+pipe: pong) -> ping {
             {
                 let b = pipe.reuse_buffer();
@@ -80,7 +79,7 @@ mod pingpong {
             }
         }
         pub type pong = pipes::SendPacketBuffered<::pingpong::pong,
-                                                  ::pingpong::packets>;
+                                                  ::pingpong::Packets>;
     }
 }
 
diff --git a/src/test/run-pass/pipe-pingpong-proto.rs b/src/test/run-pass/pipe-pingpong-proto.rs
index 0d71a2c37d1..050ff76ef9b 100644
--- a/src/test/run-pass/pipe-pingpong-proto.rs
+++ b/src/test/run-pass/pipe-pingpong-proto.rs
@@ -12,8 +12,6 @@
 
 // An example to make sure the protocol parsing syntax extension works.
 
-#[legacy_records];
-
 use core::option;
 
 proto! pingpong (
diff --git a/src/test/run-pass/pipe-presentation-examples.rs b/src/test/run-pass/pipe-presentation-examples.rs
index 7ac6337d1ca..49cda38f500 100644
--- a/src/test/run-pass/pipe-presentation-examples.rs
+++ b/src/test/run-pass/pipe-presentation-examples.rs
@@ -15,8 +15,6 @@
 // Code is easier to write in emacs, and it's good to be sure all the
 // code samples compile (or not) as they should.
 
-#[legacy_records];
-
 use double_buffer::client::*;
 use double_buffer::give_buffer;
 
diff --git a/src/test/run-pass/pipe-select.rs b/src/test/run-pass/pipe-select.rs
index 0bf739139cf..86fe90ff453 100644
--- a/src/test/run-pass/pipe-select.rs
+++ b/src/test/run-pass/pipe-select.rs
@@ -13,8 +13,6 @@
 // xfail-pretty
 // xfail-win32
 
-#[legacy_records];
-
 extern mod std;
 use std::timer::sleep;
 use std::uv;
diff --git a/src/test/run-pass/pipe-sleep.rs b/src/test/run-pass/pipe-sleep.rs
index 521c400489e..a9fa43378f1 100644
--- a/src/test/run-pass/pipe-sleep.rs
+++ b/src/test/run-pass/pipe-sleep.rs
@@ -10,8 +10,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[legacy_records];
-
 extern mod std;
 use std::timer::sleep;
 use std::uv;