diff --git a/src/test/compile-fail/alt-tag-nullary.rs b/src/test/compile-fail/alt-tag-nullary.rs index 8d1e80b77ae..6b6b052e714 100644 --- a/src/test/compile-fail/alt-tag-nullary.rs +++ b/src/test/compile-fail/alt-tag-nullary.rs @@ -1,7 +1,7 @@ // error-pattern: mismatched types -tag a { A; } -tag b { B; } +enum a { A; } +enum b { B; } fn main() { let x: a = A; alt x { B { } } } diff --git a/src/test/compile-fail/alt-tag-unary.rs b/src/test/compile-fail/alt-tag-unary.rs index 5e0fccf2f7c..b17b4ae1d54 100644 --- a/src/test/compile-fail/alt-tag-unary.rs +++ b/src/test/compile-fail/alt-tag-unary.rs @@ -1,7 +1,7 @@ // error-pattern: mismatched types -tag a { A(int); } -tag b { B(int); } +enum a { A(int); } +enum b { B(int); } fn main() { let x: a = A(0); alt x { B(y) { } } } diff --git a/src/test/compile-fail/bogus-tag.rs b/src/test/compile-fail/bogus-tag.rs index 1eadbee5497..2c8805f39b3 100644 --- a/src/test/compile-fail/bogus-tag.rs +++ b/src/test/compile-fail/bogus-tag.rs @@ -2,7 +2,7 @@ // error-pattern: unresolved -tag color { rgb(int, int, int); rgba(int, int, int, int); } +enum color { rgb(int, int, int); rgba(int, int, int, int); } fn main() { let red: color = rgb(255, 0, 0); diff --git a/src/test/compile-fail/export-no-tag-variants.rs b/src/test/compile-fail/export-no-tag-variants.rs index 2d10cb49270..310a487a0f4 100644 --- a/src/test/compile-fail/export-no-tag-variants.rs +++ b/src/test/compile-fail/export-no-tag-variants.rs @@ -6,7 +6,7 @@ mod foo { export t; - tag t { t1; } + enum t { t1; } } fn main() { let x = foo::t1; } diff --git a/src/test/compile-fail/export-tag-variant.rs b/src/test/compile-fail/export-tag-variant.rs index 33496480c02..e280ec481c7 100644 --- a/src/test/compile-fail/export-tag-variant.rs +++ b/src/test/compile-fail/export-tag-variant.rs @@ -5,7 +5,7 @@ mod foo { fn x() { } - tag y { y1; } + enum y { y1; } } fn main() { let z = foo::y1; } diff --git a/src/test/compile-fail/infinite-tag-type-recursion.rs b/src/test/compile-fail/infinite-tag-type-recursion.rs index 2d3a92af888..42d5a0303be 100644 --- a/src/test/compile-fail/infinite-tag-type-recursion.rs +++ b/src/test/compile-fail/infinite-tag-type-recursion.rs @@ -1,8 +1,8 @@ // xfail-test // -*- rust -*- -// error-pattern: tag of infinite size +// error-pattern: enum of infinite size -tag mlist { cons(int, mlist); nil; } +enum mlist { cons(int, mlist); nil; } fn main() { let a = cons(10, cons(11, nil)); } \ No newline at end of file diff --git a/src/test/compile-fail/let-destruct-refutable.rs b/src/test/compile-fail/let-destruct-refutable.rs index d1796da9037..9db73667ceb 100644 --- a/src/test/compile-fail/let-destruct-refutable.rs +++ b/src/test/compile-fail/let-destruct-refutable.rs @@ -1,6 +1,6 @@ // error-pattern:refutable pattern -tag xx { xx(int); yy; } +enum xx { xx(int); yy; } fn main() { let @{x: xx(x), y: y} = @{x: xx(10), y: 20}; diff --git a/src/test/compile-fail/name-clash-nullary-2.rs b/src/test/compile-fail/name-clash-nullary-2.rs index 99aff5bed15..66c0c1bbdaa 100644 --- a/src/test/compile-fail/name-clash-nullary-2.rs +++ b/src/test/compile-fail/name-clash-nullary-2.rs @@ -1,5 +1,5 @@ // error-pattern:Declaration of thpppt shadows -tag ack { thpppt; ffff; } +enum ack { thpppt; ffff; } fn main() { let thpppt: int = 42; diff --git a/src/test/compile-fail/occurs-check-3.rs b/src/test/compile-fail/occurs-check-3.rs index 88da7c14350..894d15bdaa3 100644 --- a/src/test/compile-fail/occurs-check-3.rs +++ b/src/test/compile-fail/occurs-check-3.rs @@ -1,4 +1,4 @@ // error-pattern:mismatched types // From Issue #778 -tag clam { a(T); } +enum clam { a(T); } fn main() { let c; c = a(c); alt c { a::(_) { } } } diff --git a/src/test/compile-fail/or-patter-mismatch.rs b/src/test/compile-fail/or-patter-mismatch.rs index dc71c2c1e42..9eb0dda7817 100644 --- a/src/test/compile-fail/or-patter-mismatch.rs +++ b/src/test/compile-fail/or-patter-mismatch.rs @@ -1,5 +1,5 @@ // error-pattern: mismatched types -tag blah { a(int, int, uint); b(int, int); } +enum blah { a(int, int, uint); b(int, int); } fn main() { alt a(1, 1, 2u) { a(_, x, y) | b(x, y) { } } } diff --git a/src/test/compile-fail/pattern-tyvar-2.rs b/src/test/compile-fail/pattern-tyvar-2.rs index cfc85d86e21..a73a1cd7862 100644 --- a/src/test/compile-fail/pattern-tyvar-2.rs +++ b/src/test/compile-fail/pattern-tyvar-2.rs @@ -6,7 +6,7 @@ import option::some; // error-pattern: mismatched types -tag bar { t1((), option::t<[int]>); t2; } +enum bar { t1((), option::t<[int]>); t2; } fn foo(t: bar) -> int { alt t { t1(_, some(x)) { ret x * 3; } _ { fail; } } } diff --git a/src/test/compile-fail/pattern-tyvar.rs b/src/test/compile-fail/pattern-tyvar.rs index 8190b74efc7..4fb36a07c2a 100644 --- a/src/test/compile-fail/pattern-tyvar.rs +++ b/src/test/compile-fail/pattern-tyvar.rs @@ -5,7 +5,7 @@ import option::some; // error-pattern: mismatched types -tag bar { t1((), option::t<[int]>); t2; } +enum bar { t1((), option::t<[int]>); t2; } fn foo(t: bar) { alt t { diff --git a/src/test/compile-fail/tag-type-args.rs b/src/test/compile-fail/tag-type-args.rs index 8e302d50e56..5c71dc4af07 100644 --- a/src/test/compile-fail/tag-type-args.rs +++ b/src/test/compile-fail/tag-type-args.rs @@ -1,6 +1,6 @@ // error-pattern: Wrong number of type arguments -tag quux { bar } +enum quux { bar } fn foo(c: quux) { assert (false); } diff --git a/src/test/compile-fail/tag-variant-cast-non-nullary.rs b/src/test/compile-fail/tag-variant-cast-non-nullary.rs index ecc518e75a1..f605407b882 100644 --- a/src/test/compile-fail/tag-variant-cast-non-nullary.rs +++ b/src/test/compile-fail/tag-variant-cast-non-nullary.rs @@ -1,7 +1,7 @@ //error-pattern: non-scalar cast // black and white have the same discriminator value ... -tag non_nullary { +enum non_nullary { nullary; other(int); } diff --git a/src/test/compile-fail/tag-variant-disr-dup.rs b/src/test/compile-fail/tag-variant-disr-dup.rs index c3e671f1011..4ca253cebef 100644 --- a/src/test/compile-fail/tag-variant-disr-dup.rs +++ b/src/test/compile-fail/tag-variant-disr-dup.rs @@ -2,7 +2,7 @@ // black and white have the same discriminator value ... -tag color { +enum color { red = 0xff0000; green = 0x00ff00; blue = 0x0000ff; diff --git a/src/test/compile-fail/tag-variant-disr-non-nullary.rs b/src/test/compile-fail/tag-variant-disr-non-nullary.rs index 3c8f25d9313..2885b6ac98f 100644 --- a/src/test/compile-fail/tag-variant-disr-non-nullary.rs +++ b/src/test/compile-fail/tag-variant-disr-non-nullary.rs @@ -1,7 +1,7 @@ //error-pattern: discriminator values can only be used with a c-like enum // black and white have the same discriminator value ... -tag color { +enum color { red = 0xff0000; green = 0x00ff00; blue = 0x0000ff; diff --git a/src/test/compile-fail/tag-variant-disr-type-mismatch.rs b/src/test/compile-fail/tag-variant-disr-type-mismatch.rs index 52badcd35e3..74213309773 100644 --- a/src/test/compile-fail/tag-variant-disr-type-mismatch.rs +++ b/src/test/compile-fail/tag-variant-disr-type-mismatch.rs @@ -1,6 +1,6 @@ //error-pattern: mismatched types -tag color { +enum color { red = 1u; blue = 2; } diff --git a/src/test/compile-fail/unreachable-arm.rs b/src/test/compile-fail/unreachable-arm.rs index ee637fed666..abc90108d75 100644 --- a/src/test/compile-fail/unreachable-arm.rs +++ b/src/test/compile-fail/unreachable-arm.rs @@ -1,5 +1,5 @@ // error-pattern:unreachable pattern -tag foo { a(@foo, int); b(uint); } +enum foo { a(@foo, int); b(uint); } fn main() { alt b(1u) { b(_) | a(@_, 1) { } a(_, 1) { } } } diff --git a/src/test/compile-fail/unsafe-alt.rs b/src/test/compile-fail/unsafe-alt.rs index 56adb4411ba..877dc65d9c1 100644 --- a/src/test/compile-fail/unsafe-alt.rs +++ b/src/test/compile-fail/unsafe-alt.rs @@ -1,6 +1,6 @@ // error-pattern:invalidate reference i -tag foo { left({mutable x: int}); right(bool); } +enum foo { left({mutable x: int}); right(bool); } fn main() { let x = left({mutable x: 10});