summary refs log tree commit diff
path: root/src/test/compile-fail
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/test/compile-fail
parentbd2d17e4a1f75bc7e451fc1054d98ff13c456850 (diff)
downloadrust-e48446d060bb35925af0e79fcd2554f83ee26ecd.tar.gz
rust-e48446d060bb35925af0e79fcd2554f83ee26ecd.zip
test: Remove newtype enums from the test suite. rs=deenum
Diffstat (limited to 'src/test/compile-fail')
-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
19 files changed, 20 insertions, 19 deletions
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; }