about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-03-07 16:36:30 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-03-11 09:35:58 -0700
commite48446d060bb35925af0e79fcd2554f83ee26ecd (patch)
tree099a538dcad8e80d443fd718d364fc98ee13266b /src
parentbd2d17e4a1f75bc7e451fc1054d98ff13c456850 (diff)
downloadrust-e48446d060bb35925af0e79fcd2554f83ee26ecd.tar.gz
rust-e48446d060bb35925af0e79fcd2554f83ee26ecd.zip
test: Remove newtype enums from the test suite. rs=deenum
Diffstat (limited to 'src')
-rw-r--r--src/test/auxiliary/issue_2472_b.rs2
-rw-r--r--src/test/auxiliary/issue_3136_a.rs2
-rw-r--r--src/test/compile-fail/access-mode-in-closures.rs2
-rw-r--r--src/test/compile-fail/borrowck-assign-to-enum.rs2
-rw-r--r--src/test/compile-fail/borrowck-autoref-3261.rs3
-rw-r--r--src/test/compile-fail/borrowck-loan-in-overloaded-op.rs2
-rw-r--r--src/test/compile-fail/borrowck-mut-deref-comp.rs2
-rw-r--r--src/test/compile-fail/borrowck-unary-move-2.rs2
-rw-r--r--src/test/compile-fail/enum-in-scope.rs2
-rw-r--r--src/test/compile-fail/issue-2063-resource.rs2
-rw-r--r--src/test/compile-fail/issue-2063.rs2
-rw-r--r--src/test/compile-fail/issue-2718-a.rs2
-rw-r--r--src/test/compile-fail/issue-3080.rs2
-rw-r--r--src/test/compile-fail/issue-3344.rs2
-rw-r--r--src/test/compile-fail/issue-3953.rs2
-rw-r--r--src/test/compile-fail/liveness-use-after-send.rs2
-rw-r--r--src/test/compile-fail/pat-shadow-in-nested-binding.rs2
-rw-r--r--src/test/compile-fail/regions-bounds.rs2
-rw-r--r--src/test/compile-fail/regions-infer-region-in-fn-but-not-type.rs2
-rw-r--r--src/test/compile-fail/tps-invariant-enum.rs2
-rw-r--r--src/test/compile-fail/tps-invariant-trait.rs2
-rw-r--r--src/test/run-pass/alignment-gep-tup-like-2.rs2
-rw-r--r--src/test/run-pass/auto-encode.rs15
-rw-r--r--src/test/run-pass/auto-ref-newtype.rs2
-rw-r--r--src/test/run-pass/autoderef-method-newtype.rs2
-rw-r--r--src/test/run-pass/const-enum-newtype-align.rs17
-rw-r--r--src/test/run-pass/const-newtype-enum.rs20
-rw-r--r--src/test/run-pass/instantiable.rs2
-rw-r--r--src/test/run-pass/issue-2312.rs2
-rw-r--r--src/test/run-pass/issue-2718.rs4
-rw-r--r--src/test/run-pass/let-destruct.rs2
-rw-r--r--src/test/run-pass/log-degen-enum.rs17
-rw-r--r--src/test/run-pass/newtype-polymorphic.rs2
-rw-r--r--src/test/run-pass/newtype.rs2
-rw-r--r--src/test/run-pass/pipe-pingpong-bounded.rs4
-rw-r--r--src/test/run-pass/reflect-visit-data.rs4
-rw-r--r--src/test/run-pass/reflect-visit-type.rs2
-rw-r--r--src/test/run-pass/regions-mock-trans.rs2
-rw-r--r--src/test/run-pass/resource-cycle.rs2
-rw-r--r--src/test/run-pass/resource-cycle2.rs2
-rw-r--r--src/test/run-pass/resource-cycle3.rs2
-rw-r--r--src/test/run-pass/trait-cast.rs2
42 files changed, 42 insertions, 110 deletions
diff --git a/src/test/auxiliary/issue_2472_b.rs b/src/test/auxiliary/issue_2472_b.rs
index e7a92954725..fd3355d83fa 100644
--- a/src/test/auxiliary/issue_2472_b.rs
+++ b/src/test/auxiliary/issue_2472_b.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 
-enum S = ();
+struct S(())
 
 pub impl S {
     fn foo() { }
diff --git a/src/test/auxiliary/issue_3136_a.rs b/src/test/auxiliary/issue_3136_a.rs
index 4de0b900dd3..c80457ef1e9 100644
--- a/src/test/auxiliary/issue_3136_a.rs
+++ b/src/test/auxiliary/issue_3136_a.rs
@@ -11,7 +11,7 @@
 trait x {
     fn use_x<T>();
 }
-enum y = (); 
+struct y(());
 impl x for y { 
     fn use_x<T>() {
         struct foo { //~ ERROR quux
diff --git a/src/test/compile-fail/access-mode-in-closures.rs b/src/test/compile-fail/access-mode-in-closures.rs
index 24897608880..f6b9a82ec67 100644
--- a/src/test/compile-fail/access-mode-in-closures.rs
+++ b/src/test/compile-fail/access-mode-in-closures.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 
-enum sty = ~[int];
+struct sty(~[int]);
 
 fn unpack(_unpack: &fn(v: &sty) -> ~[int]) {}
 
diff --git a/src/test/compile-fail/borrowck-assign-to-enum.rs b/src/test/compile-fail/borrowck-assign-to-enum.rs
index 25a320061d4..ee38ceda3d8 100644
--- a/src/test/compile-fail/borrowck-assign-to-enum.rs
+++ b/src/test/compile-fail/borrowck-assign-to-enum.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-enum foo = int;
+struct foo(int);
 
 fn main() {
     let x = foo(3);
diff --git a/src/test/compile-fail/borrowck-autoref-3261.rs b/src/test/compile-fail/borrowck-autoref-3261.rs
index 237c1b86713..b874eac34b1 100644
--- a/src/test/compile-fail/borrowck-autoref-3261.rs
+++ b/src/test/compile-fail/borrowck-autoref-3261.rs
@@ -8,7 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-enum X = Either<(uint,uint),extern fn()>;
+struct X(Either<(uint,uint),extern fn()>);
+
 pub impl &'self X {
     fn with(blk: &fn(x: &Either<(uint,uint),extern fn()>)) {
         blk(&**self)
diff --git a/src/test/compile-fail/borrowck-loan-in-overloaded-op.rs b/src/test/compile-fail/borrowck-loan-in-overloaded-op.rs
index 7b6484fd4aa..ece9ae7e861 100644
--- a/src/test/compile-fail/borrowck-loan-in-overloaded-op.rs
+++ b/src/test/compile-fail/borrowck-loan-in-overloaded-op.rs
@@ -10,7 +10,7 @@
 
 // xfail-test #3387
 
-enum foo = ~uint;
+struct foo(~uint);
 
 impl Add<foo, foo> for foo {
     pure fn add(f: &foo) -> foo {
diff --git a/src/test/compile-fail/borrowck-mut-deref-comp.rs b/src/test/compile-fail/borrowck-mut-deref-comp.rs
index 3c67b6d5caf..540793d4135 100644
--- a/src/test/compile-fail/borrowck-mut-deref-comp.rs
+++ b/src/test/compile-fail/borrowck-mut-deref-comp.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-enum foo = ~int;
+struct foo(~int);
 
 fn borrow(x: @mut foo) {
     let _y = &***x; //~ ERROR illegal borrow unless pure
diff --git a/src/test/compile-fail/borrowck-unary-move-2.rs b/src/test/compile-fail/borrowck-unary-move-2.rs
index a25fc8327bd..05dab4f8c68 100644
--- a/src/test/compile-fail/borrowck-unary-move-2.rs
+++ b/src/test/compile-fail/borrowck-unary-move-2.rs
@@ -24,7 +24,7 @@ fn noncopyable() -> noncopyable {
     }
 }
 
-enum wrapper = noncopyable;
+struct wrapper(noncopyable);
 
 fn main() {
     let x1 = wrapper(noncopyable());
diff --git a/src/test/compile-fail/enum-in-scope.rs b/src/test/compile-fail/enum-in-scope.rs
index 704001de958..cccf66ef2d5 100644
--- a/src/test/compile-fail/enum-in-scope.rs
+++ b/src/test/compile-fail/enum-in-scope.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-enum hello = int;
+struct hello(int);
 
 fn main() {
     let hello = 0; //~ERROR declaration of `hello` shadows
diff --git a/src/test/compile-fail/issue-2063-resource.rs b/src/test/compile-fail/issue-2063-resource.rs
index 137ce2d5030..db054d5aba7 100644
--- a/src/test/compile-fail/issue-2063-resource.rs
+++ b/src/test/compile-fail/issue-2063-resource.rs
@@ -16,7 +16,7 @@ struct t { //~ ERROR this type cannot be instantiated
   to_str: (),
 }
 
-enum x = @t; //~ ERROR this type cannot be instantiated
+struct x(@t); //~ ERROR this type cannot be instantiated
 
 fn main() {
 }
diff --git a/src/test/compile-fail/issue-2063.rs b/src/test/compile-fail/issue-2063.rs
index 8f344f42606..515db2b431c 100644
--- a/src/test/compile-fail/issue-2063.rs
+++ b/src/test/compile-fail/issue-2063.rs
@@ -11,7 +11,7 @@
 // test that autoderef of a type like this does not
 // cause compiler to loop.  Note that no instances
 // of such a type could ever be constructed.
-enum t = @t; //~ ERROR this type cannot be instantiated
+enum t(@t); //~ ERROR this type cannot be instantiated
 
 trait to_str_2 {
     fn to_str() -> ~str;
diff --git a/src/test/compile-fail/issue-2718-a.rs b/src/test/compile-fail/issue-2718-a.rs
index 925350d9b88..318982c3b13 100644
--- a/src/test/compile-fail/issue-2718-a.rs
+++ b/src/test/compile-fail/issue-2718-a.rs
@@ -16,7 +16,7 @@ pub struct send_packet<T> {
 mod pingpong {
     use send_packet;
     pub type ping = send_packet<pong>;
-    pub enum pong = send_packet<ping>; //~ ERROR illegal recursive enum type; wrap the inner value in a box to make it representable
+    pub struct pong(send_packet<ping>); //~ ERROR illegal recursive enum type; wrap the inner value in a box to make it representable
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/issue-3080.rs b/src/test/compile-fail/issue-3080.rs
index 530dadd7e90..02df25d87d7 100644
--- a/src/test/compile-fail/issue-3080.rs
+++ b/src/test/compile-fail/issue-3080.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // xfail-test
-enum x = ();
+struct x(());
 pub impl x {
     unsafe fn with() { } // This should fail
 }
diff --git a/src/test/compile-fail/issue-3344.rs b/src/test/compile-fail/issue-3344.rs
index 2d31867752a..df768860cba 100644
--- a/src/test/compile-fail/issue-3344.rs
+++ b/src/test/compile-fail/issue-3344.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-enum thing = uint;
+struct thing(uint);
 impl cmp::Ord for thing { //~ ERROR missing method `gt`
     pure fn lt(&self, other: &thing) -> bool { **self < **other }
     pure fn le(&self, other: &thing) -> bool { **self < **other }
diff --git a/src/test/compile-fail/issue-3953.rs b/src/test/compile-fail/issue-3953.rs
index afd8cf89233..bfc17c589db 100644
--- a/src/test/compile-fail/issue-3953.rs
+++ b/src/test/compile-fail/issue-3953.rs
@@ -20,7 +20,7 @@ trait Hahaha: Eq + Eq + Eq + Eq + Eq + //~ ERROR Duplicate supertrait
               Eq + Eq + Eq + Eq + Eq + Eq + Eq + Eq + Eq + Eq + Eq + Eq +
               Eq {}
 
-enum Lol = int;
+struct Lol(int);
 
 impl Hahaha for Lol { }
 
diff --git a/src/test/compile-fail/liveness-use-after-send.rs b/src/test/compile-fail/liveness-use-after-send.rs
index 95dd59eb27f..c0de60fa58e 100644
--- a/src/test/compile-fail/liveness-use-after-send.rs
+++ b/src/test/compile-fail/liveness-use-after-send.rs
@@ -14,7 +14,7 @@ fn send<T:Owned>(ch: _chan<T>, -data: T) {
     fail!();
 }
 
-enum _chan<T> = int;
+struct _chan<T>(int);
 
 // Tests that "log(debug, message);" is flagged as using
 // message after the send deinitializes it
diff --git a/src/test/compile-fail/pat-shadow-in-nested-binding.rs b/src/test/compile-fail/pat-shadow-in-nested-binding.rs
index 3d258755185..4d89ec14d94 100644
--- a/src/test/compile-fail/pat-shadow-in-nested-binding.rs
+++ b/src/test/compile-fail/pat-shadow-in-nested-binding.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-enum foo = uint;
+struct foo(uint);
 
 fn main() {
     let (foo, _) = (2, 3); //~ ERROR declaration of `foo` shadows
diff --git a/src/test/compile-fail/regions-bounds.rs b/src/test/compile-fail/regions-bounds.rs
index c7a951c9c05..35bef5a407a 100644
--- a/src/test/compile-fail/regions-bounds.rs
+++ b/src/test/compile-fail/regions-bounds.rs
@@ -12,7 +12,7 @@
 // nominal types (but not on other types) and that they are type
 // checked.
 
-enum an_enum = &'self int;
+struct an_enum(&'self int);
 trait a_trait {
     fn foo() -> &'self int;
 }
diff --git a/src/test/compile-fail/regions-infer-region-in-fn-but-not-type.rs b/src/test/compile-fail/regions-infer-region-in-fn-but-not-type.rs
index fe37d899098..4c3338d2e1d 100644
--- a/src/test/compile-fail/regions-infer-region-in-fn-but-not-type.rs
+++ b/src/test/compile-fail/regions-infer-region-in-fn-but-not-type.rs
@@ -11,7 +11,7 @@
 
 // check that the &int here does not cause us to think that `foo`
 // contains region pointers
-enum foo = ~fn(x: &int);
+struct foo(~fn(x: &int));
 
 fn take_foo(x: foo<'static>) {} //~ ERROR no region bound is allowed on `foo`
 
diff --git a/src/test/compile-fail/tps-invariant-enum.rs b/src/test/compile-fail/tps-invariant-enum.rs
index 967b201908c..9e19ecdcb75 100644
--- a/src/test/compile-fail/tps-invariant-enum.rs
+++ b/src/test/compile-fail/tps-invariant-enum.rs
@@ -12,7 +12,7 @@ struct box<T> {
     f: T
 }
 
-enum box_impl<T> = box<T>;
+struct box_impl<T>(box<T>);
 
 fn set_box_impl<T>(b: box_impl<@const T>, v: @const T) {
     b.f = v;
diff --git a/src/test/compile-fail/tps-invariant-trait.rs b/src/test/compile-fail/tps-invariant-trait.rs
index 94bcea8f1d3..9569e5f1e82 100644
--- a/src/test/compile-fail/tps-invariant-trait.rs
+++ b/src/test/compile-fail/tps-invariant-trait.rs
@@ -17,7 +17,7 @@ struct box<T> {
     f: T
 }
 
-enum box_impl<T> = box<T>;
+struct box_impl<T>(box<T>);
 
 impl<T:Copy> box_trait<T> for box_impl<T> {
     fn get() -> T { return self.f; }
diff --git a/src/test/run-pass/alignment-gep-tup-like-2.rs b/src/test/run-pass/alignment-gep-tup-like-2.rs
index 5bf8051cc1a..22855bce28f 100644
--- a/src/test/run-pass/alignment-gep-tup-like-2.rs
+++ b/src/test/run-pass/alignment-gep-tup-like-2.rs
@@ -12,7 +12,7 @@ struct Pair<A,B> {
     a: A, b: B
 }
 
-enum RecEnum<A> = Rec<A>;
+struct RecEnum<A>(Rec<A>);
 struct Rec<A> {
     val: A,
     rec: Option<@mut RecEnum<A>>
diff --git a/src/test/run-pass/auto-encode.rs b/src/test/run-pass/auto-encode.rs
index f9e5ebf261c..b6fdb07789c 100644
--- a/src/test/run-pass/auto-encode.rs
+++ b/src/test/run-pass/auto-encode.rs
@@ -85,13 +85,6 @@ impl cmp::Eq for Expr {
     pure fn ne(&self, other: &Expr) -> bool { !(*self).eq(other) }
 }
 
-impl cmp::Eq for AnEnum {
-    pure fn eq(&self, other: &AnEnum) -> bool {
-        (*self).v == other.v
-    }
-    pure fn ne(&self, other: &AnEnum) -> bool { !(*self).eq(other) }
-}
-
 impl cmp::Eq for Point {
     pure fn eq(&self, other: &Point) -> bool {
         self.x == other.x && self.y == other.y
@@ -141,10 +134,6 @@ struct SomeStruct { v: ~[uint] }
 
 #[auto_encode]
 #[auto_decode]
-enum AnEnum = SomeStruct;
-
-#[auto_encode]
-#[auto_decode]
 struct Point {x: uint, y: uint}
 
 #[auto_encode]
@@ -168,10 +157,6 @@ pub fn main() {
     test_prettyprint(a, &~"Spanned {lo: 0u, hi: 5u, node: 22u}");
     test_ebml(a);
 
-    let a = &AnEnum(SomeStruct {v: ~[1u, 2u, 3u]});
-    test_prettyprint(a, &~"AnEnum(SomeStruct {v: ~[1u, 2u, 3u]})");
-    test_ebml(a);
-
     let a = &Point {x: 3u, y: 5u};
     test_prettyprint(a, &~"Point {x: 3u, y: 5u}");
     test_ebml(a);
diff --git a/src/test/run-pass/auto-ref-newtype.rs b/src/test/run-pass/auto-ref-newtype.rs
index cdcf3c54c58..9a84aa6a10e 100644
--- a/src/test/run-pass/auto-ref-newtype.rs
+++ b/src/test/run-pass/auto-ref-newtype.rs
@@ -11,7 +11,7 @@
 // Check that we can define inherent methods on newtype enums that use
 // an auto-ref'd receiver.
 
-enum Foo = uint;
+struct Foo(uint);
 
 pub impl Foo {
     fn len(&self) -> uint { **self }
diff --git a/src/test/run-pass/autoderef-method-newtype.rs b/src/test/run-pass/autoderef-method-newtype.rs
index 9cd4093787d..732c26694ad 100644
--- a/src/test/run-pass/autoderef-method-newtype.rs
+++ b/src/test/run-pass/autoderef-method-newtype.rs
@@ -16,7 +16,7 @@ impl double for uint {
     fn double() -> uint { self * 2u }
 }
 
-enum foo = uint;
+struct foo(uint);
 
 pub fn main() {
     let x = foo(3u);
diff --git a/src/test/run-pass/const-enum-newtype-align.rs b/src/test/run-pass/const-enum-newtype-align.rs
deleted file mode 100644
index 5aa9aeafeed..00000000000
--- a/src/test/run-pass/const-enum-newtype-align.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2013 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.
-
-enum E = u32;
-struct S { a: u8, b: E }
-const C: S = S { a: 0xA5, b: E(0xDEADBEEF) };
-
-pub fn main() {
-    fail_unless!(C.b == 0xDEADBEEF);
-}
diff --git a/src/test/run-pass/const-newtype-enum.rs b/src/test/run-pass/const-newtype-enum.rs
deleted file mode 100644
index b96b0e957c9..00000000000
--- a/src/test/run-pass/const-newtype-enum.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2013 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.
-
-enum Foo = u32;
-
-const X: Foo = Foo(17);
-
-pub fn main() {
-    fail_unless!((*X == 17));
-    fail_unless!((*Y == 23));
-}
-
-const Y: Foo = Foo(23);
diff --git a/src/test/run-pass/instantiable.rs b/src/test/run-pass/instantiable.rs
index 2230c2df9fc..c140a66ffe4 100644
--- a/src/test/run-pass/instantiable.rs
+++ b/src/test/run-pass/instantiable.rs
@@ -11,7 +11,7 @@
 
 // check that we do not report a type like this as uninstantiable,
 // even though it would be if the nxt field had type @foo:
-enum foo = X;
+struct foo(X);
 
 struct X { x: uint, nxt: *foo }
 
diff --git a/src/test/run-pass/issue-2312.rs b/src/test/run-pass/issue-2312.rs
index 9e45a6b53c2..ad6320aed2b 100644
--- a/src/test/run-pass/issue-2312.rs
+++ b/src/test/run-pass/issue-2312.rs
@@ -12,7 +12,7 @@
 
 trait clam<A> { }
 
-enum foo = int;
+struct foo(int);
 
 pub impl foo {
     fn bar<B,C:clam<B>>(c: C) -> B { fail!(); }
diff --git a/src/test/run-pass/issue-2718.rs b/src/test/run-pass/issue-2718.rs
index d39f02a3574..1376f20571b 100644
--- a/src/test/run-pass/issue-2718.rs
+++ b/src/test/run-pass/issue-2718.rs
@@ -225,8 +225,8 @@ pub mod pingpong {
     use core::cast;
     use core::ptr;
 
-    pub enum ping = ::pipes::send_packet<pong>;
-    pub enum pong = ::pipes::send_packet<ping>;
+    pub struct ping(::pipes::send_packet<pong>);
+    pub struct pong(::pipes::send_packet<ping>);
 
     pub fn liberate_ping(-p: ping) -> ::pipes::send_packet<pong> {
         unsafe {
diff --git a/src/test/run-pass/let-destruct.rs b/src/test/run-pass/let-destruct.rs
index eec3064cbbd..05e50e3e660 100644
--- a/src/test/run-pass/let-destruct.rs
+++ b/src/test/run-pass/let-destruct.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-enum xx = int;
+struct xx(int);
 
 struct X { x: xx, y: int }
 
diff --git a/src/test/run-pass/log-degen-enum.rs b/src/test/run-pass/log-degen-enum.rs
deleted file mode 100644
index 79ad6e8a250..00000000000
--- a/src/test/run-pass/log-degen-enum.rs
+++ /dev/null
@@ -1,17 +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.
-
-enum Foo = uint;
-
-pub fn main() {
-    let x = Foo(1);
-    let y = fmt!("%?", x);
-    fail_unless!(y == ~"Foo(1)");
-}
diff --git a/src/test/run-pass/newtype-polymorphic.rs b/src/test/run-pass/newtype-polymorphic.rs
index d661fecc526..18132d15d57 100644
--- a/src/test/run-pass/newtype-polymorphic.rs
+++ b/src/test/run-pass/newtype-polymorphic.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-enum myvec<X> = ~[X];
+struct myvec<X>(~[X]);
 
 fn myvec_deref<X:Copy>(mv: myvec<X>) -> ~[X] { return copy *mv; }
 
diff --git a/src/test/run-pass/newtype.rs b/src/test/run-pass/newtype.rs
index 41b16193ca1..6a82f70d915 100644
--- a/src/test/run-pass/newtype.rs
+++ b/src/test/run-pass/newtype.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-enum mytype = Mytype;
+struct mytype(Mytype);
 
 struct Mytype {compute: extern fn(mytype) -> int, val: int}
 
diff --git a/src/test/run-pass/pipe-pingpong-bounded.rs b/src/test/run-pass/pipe-pingpong-bounded.rs
index 2b270a54d80..f1686080f46 100644
--- a/src/test/run-pass/pipe-pingpong-bounded.rs
+++ b/src/test/run-pass/pipe-pingpong-bounded.rs
@@ -43,8 +43,8 @@ mod pingpong {
             ptr::addr_of(&(data.ping))
         }
     }
-    pub enum ping = server::pong;
-    pub enum pong = client::ping;
+    pub struct ping(server::pong);
+    pub struct pong(client::ping);
     pub mod client {
         use core::pipes;
         use core::pipes::*;
diff --git a/src/test/run-pass/reflect-visit-data.rs b/src/test/run-pass/reflect-visit-data.rs
index 90aaafd247b..0f3f4db3bbf 100644
--- a/src/test/run-pass/reflect-visit-data.rs
+++ b/src/test/run-pass/reflect-visit-data.rs
@@ -28,7 +28,7 @@ fn align(size: uint, align: uint) -> uint {
     ((size + align) - 1u) & !(align - 1u)
 }
 
-enum ptr_visit_adaptor<V> = Inner<V>;
+struct ptr_visit_adaptor<V>(Inner<V>);
 
 pub impl<V:TyVisitor + movable_ptr> ptr_visit_adaptor<V> {
 
@@ -470,7 +470,7 @@ impl<V:TyVisitor + movable_ptr> TyVisitor for ptr_visit_adaptor<V> {
     }
 }
 
-enum my_visitor = @mut Stuff;
+struct my_visitor(@mut Stuff);
 
 struct Stuff {
     ptr1: *c_void,
diff --git a/src/test/run-pass/reflect-visit-type.rs b/src/test/run-pass/reflect-visit-type.rs
index 6efd40b1fd6..bc67ece79de 100644
--- a/src/test/run-pass/reflect-visit-type.rs
+++ b/src/test/run-pass/reflect-visit-type.rs
@@ -10,7 +10,7 @@
 
 // xfail-test
 use intrinsic::{TyDesc, get_tydesc, visit_tydesc, TyVisitor};
-enum my_visitor = @mut { types: ~[str] };
+struct my_visitor(@mut { types: ~[str] });
 
 impl TyVisitor for my_visitor {
     fn visit_bot() -> bool {
diff --git a/src/test/run-pass/regions-mock-trans.rs b/src/test/run-pass/regions-mock-trans.rs
index 7a1b9ae563a..b249a4470cb 100644
--- a/src/test/run-pass/regions-mock-trans.rs
+++ b/src/test/run-pass/regions-mock-trans.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-enum arena = ();
+struct arena(());
 
 struct Bcx {
     fcx: &'self Fcx<'self>
diff --git a/src/test/run-pass/resource-cycle.rs b/src/test/run-pass/resource-cycle.rs
index f5a959b2dbc..058cb4ec77e 100644
--- a/src/test/run-pass/resource-cycle.rs
+++ b/src/test/run-pass/resource-cycle.rs
@@ -34,7 +34,7 @@ fn r(v: *int) -> r {
     }
 }
 
-enum t = Node;
+struct t(Node);
 
 struct Node {
     next: Option<@mut t>,
diff --git a/src/test/run-pass/resource-cycle2.rs b/src/test/run-pass/resource-cycle2.rs
index cf5f36916a0..e3b03060893 100644
--- a/src/test/run-pass/resource-cycle2.rs
+++ b/src/test/run-pass/resource-cycle2.rs
@@ -34,7 +34,7 @@ fn r(v: U) -> r {
     }
 }
 
-enum t = Node;
+struct t(Node);
 
 struct Node {
     next: Option<@mut t>,
diff --git a/src/test/run-pass/resource-cycle3.rs b/src/test/run-pass/resource-cycle3.rs
index 4cd3df0f87f..c76c1c6aeb9 100644
--- a/src/test/run-pass/resource-cycle3.rs
+++ b/src/test/run-pass/resource-cycle3.rs
@@ -43,7 +43,7 @@ fn r(v: U, w: int, _x: *int) -> R {
     }
 }
 
-enum t = Node;
+struct t(Node);
 
 struct Node {
     next: Option<@mut t>,
diff --git a/src/test/run-pass/trait-cast.rs b/src/test/run-pass/trait-cast.rs
index 677852a74d6..4cee3c636c5 100644
--- a/src/test/run-pass/trait-cast.rs
+++ b/src/test/run-pass/trait-cast.rs
@@ -13,7 +13,7 @@
 
 // Test cyclic detector when using trait instances.
 
-enum Tree = @mut TreeR;
+struct Tree(@mut TreeR);
 struct TreeR {
     left: Option<Tree>,
     right: Option<Tree>,