Skip to content

Commit e48446d

Browse files
committed
test: Remove newtype enums from the test suite. rs=deenum
1 parent bd2d17e commit e48446d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+42
-110
lines changed

src/test/auxiliary/issue_2472_b.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111

12-
enum S = ();
12+
struct S(())
1313

1414
pub impl S {
1515
fn foo() { }

src/test/auxiliary/issue_3136_a.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
trait x {
1212
fn use_x<T>();
1313
}
14-
enum y = ();
14+
struct y(());
1515
impl x for y {
1616
fn use_x<T>() {
1717
struct foo { //~ ERROR quux

src/test/compile-fail/access-mode-in-closures.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111

12-
enum sty = ~[int];
12+
struct sty(~[int]);
1313

1414
fn unpack(_unpack: &fn(v: &sty) -> ~[int]) {}
1515

src/test/compile-fail/borrowck-assign-to-enum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
enum foo = int;
11+
struct foo(int);
1212

1313
fn main() {
1414
let x = foo(3);

src/test/compile-fail/borrowck-autoref-3261.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
enum X = Either<(uint,uint),extern fn()>;
11+
struct X(Either<(uint,uint),extern fn()>);
12+
1213
pub impl &'self X {
1314
fn with(blk: &fn(x: &Either<(uint,uint),extern fn()>)) {
1415
blk(&**self)

src/test/compile-fail/borrowck-loan-in-overloaded-op.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// xfail-test #3387
1212

13-
enum foo = ~uint;
13+
struct foo(~uint);
1414

1515
impl Add<foo, foo> for foo {
1616
pure fn add(f: &foo) -> foo {

src/test/compile-fail/borrowck-mut-deref-comp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
enum foo = ~int;
11+
struct foo(~int);
1212

1313
fn borrow(x: @mut foo) {
1414
let _y = &***x; //~ ERROR illegal borrow unless pure

src/test/compile-fail/borrowck-unary-move-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn noncopyable() -> noncopyable {
2424
}
2525
}
2626

27-
enum wrapper = noncopyable;
27+
struct wrapper(noncopyable);
2828

2929
fn main() {
3030
let x1 = wrapper(noncopyable());

src/test/compile-fail/enum-in-scope.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
enum hello = int;
11+
struct hello(int);
1212

1313
fn main() {
1414
let hello = 0; //~ERROR declaration of `hello` shadows

src/test/compile-fail/issue-2063-resource.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ struct t { //~ ERROR this type cannot be instantiated
1616
to_str: (),
1717
}
1818

19-
enum x = @t; //~ ERROR this type cannot be instantiated
19+
struct x(@t); //~ ERROR this type cannot be instantiated
2020

2121
fn main() {
2222
}

0 commit comments

Comments
 (0)