From e48446d060bb35925af0e79fcd2554f83ee26ecd Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 7 Mar 2013 16:36:30 -0800 Subject: [PATCH] test: Remove newtype enums from the test suite. rs=deenum --- src/test/auxiliary/issue_2472_b.rs | 2 +- src/test/auxiliary/issue_3136_a.rs | 2 +- .../compile-fail/access-mode-in-closures.rs | 2 +- .../compile-fail/borrowck-assign-to-enum.rs | 2 +- .../compile-fail/borrowck-autoref-3261.rs | 3 ++- .../borrowck-loan-in-overloaded-op.rs | 2 +- .../compile-fail/borrowck-mut-deref-comp.rs | 2 +- .../compile-fail/borrowck-unary-move-2.rs | 2 +- src/test/compile-fail/enum-in-scope.rs | 2 +- src/test/compile-fail/issue-2063-resource.rs | 2 +- src/test/compile-fail/issue-2063.rs | 2 +- src/test/compile-fail/issue-2718-a.rs | 2 +- src/test/compile-fail/issue-3080.rs | 2 +- src/test/compile-fail/issue-3344.rs | 2 +- src/test/compile-fail/issue-3953.rs | 2 +- .../compile-fail/liveness-use-after-send.rs | 2 +- .../pat-shadow-in-nested-binding.rs | 2 +- src/test/compile-fail/regions-bounds.rs | 2 +- ...regions-infer-region-in-fn-but-not-type.rs | 2 +- src/test/compile-fail/tps-invariant-enum.rs | 2 +- src/test/compile-fail/tps-invariant-trait.rs | 2 +- src/test/run-pass/alignment-gep-tup-like-2.rs | 2 +- src/test/run-pass/auto-encode.rs | 15 -------------- src/test/run-pass/auto-ref-newtype.rs | 2 +- src/test/run-pass/autoderef-method-newtype.rs | 2 +- src/test/run-pass/const-enum-newtype-align.rs | 17 ---------------- src/test/run-pass/const-newtype-enum.rs | 20 ------------------- src/test/run-pass/instantiable.rs | 2 +- src/test/run-pass/issue-2312.rs | 2 +- src/test/run-pass/issue-2718.rs | 4 ++-- src/test/run-pass/let-destruct.rs | 2 +- src/test/run-pass/log-degen-enum.rs | 17 ---------------- src/test/run-pass/newtype-polymorphic.rs | 2 +- src/test/run-pass/newtype.rs | 2 +- src/test/run-pass/pipe-pingpong-bounded.rs | 4 ++-- src/test/run-pass/reflect-visit-data.rs | 4 ++-- src/test/run-pass/reflect-visit-type.rs | 2 +- src/test/run-pass/regions-mock-trans.rs | 2 +- src/test/run-pass/resource-cycle.rs | 2 +- src/test/run-pass/resource-cycle2.rs | 2 +- src/test/run-pass/resource-cycle3.rs | 2 +- src/test/run-pass/trait-cast.rs | 2 +- 42 files changed, 42 insertions(+), 110 deletions(-) delete mode 100644 src/test/run-pass/const-enum-newtype-align.rs delete mode 100644 src/test/run-pass/const-newtype-enum.rs delete mode 100644 src/test/run-pass/log-degen-enum.rs 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(); } -enum y = (); +struct y(()); impl x for y { fn use_x() { 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 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 { mod pingpong { use send_packet; pub type ping = send_packet; - pub enum pong = send_packet; //~ ERROR illegal recursive enum type; wrap the inner value in a box to make it representable + pub struct pong(send_packet); //~ 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(ch: _chan, -data: T) { fail!(); } -enum _chan = int; +struct _chan(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 { f: T } -enum box_impl = box; +struct box_impl(box); fn set_box_impl(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 { f: T } -enum box_impl = box; +struct box_impl(box); impl box_trait for box_impl { 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: A, b: B } -enum RecEnum = Rec; +struct RecEnum(Rec); struct Rec { val: A, rec: Option<@mut RecEnum> 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 @@ -139,10 +132,6 @@ struct Spanned { #[auto_decode] struct SomeStruct { v: ~[uint] } -#[auto_encode] -#[auto_decode] -enum AnEnum = SomeStruct; - #[auto_encode] #[auto_decode] struct Point {x: uint, y: uint} @@ -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 or the MIT license -// , 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 or the MIT license -// , 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 { } -enum foo = int; +struct foo(int); pub impl foo { fn bar>(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; - pub enum pong = ::pipes::send_packet; + pub struct ping(::pipes::send_packet); + pub struct pong(::pipes::send_packet); pub fn liberate_ping(-p: ping) -> ::pipes::send_packet { 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 or the MIT license -// , 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]; +struct myvec(~[X]); fn myvec_deref(mv: myvec) -> ~[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 = Inner; +struct ptr_visit_adaptor(Inner); pub impl ptr_visit_adaptor { @@ -470,7 +470,7 @@ impl TyVisitor for ptr_visit_adaptor { } } -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, right: Option,