From 59ebe6af187ce0504b40c177f1700b090b226625 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 19 Jan 2012 18:31:08 -0800 Subject: [PATCH] rustc: Make the pretty printer output commas after enum variants. Update all tests accordingly. --- src/comp/syntax/print/pprust.rs | 2 +- src/test/bench/99bob-pattern.rs | 2 +- src/test/bench/shootout-binarytrees.rs | 2 +- src/test/bench/sudoku.rs | 2 +- src/test/bench/task-perf-word-count.rs | 6 +++--- src/test/compile-fail/alt-tag-nullary.rs | 4 ++-- src/test/compile-fail/alt-tag-unary.rs | 4 ++-- src/test/compile-fail/bogus-tag.rs | 2 +- src/test/compile-fail/export-no-tag-variants.rs | 2 +- src/test/compile-fail/export-tag-variant.rs | 2 +- src/test/compile-fail/infinite-tag-type-recursion.rs | 2 +- src/test/compile-fail/let-destruct-refutable.rs | 2 +- src/test/compile-fail/name-clash-nullary-2.rs | 2 +- src/test/compile-fail/occurs-check-3.rs | 2 +- src/test/compile-fail/or-patter-mismatch.rs | 2 +- src/test/compile-fail/pattern-tyvar-2.rs | 2 +- src/test/compile-fail/pattern-tyvar.rs | 2 +- .../compile-fail/tag-variant-cast-non-nullary.rs | 4 ++-- src/test/compile-fail/tag-variant-disr-dup.rs | 10 +++++----- .../compile-fail/tag-variant-disr-non-nullary.rs | 12 ++++++------ .../compile-fail/tag-variant-disr-type-mismatch.rs | 4 ++-- src/test/compile-fail/unreachable-arm.rs | 2 +- src/test/pretty/tag-blank-lines.rs | 4 ++-- src/test/run-fail/non-exhaustive-match.rs | 2 +- src/test/run-pass/alias-uninit-value.rs | 2 +- src/test/run-pass/alloca-from-derived-tydesc.rs | 2 +- src/test/run-pass/alt-path.rs | 2 +- src/test/run-pass/alt-pattern-drop.rs | 2 +- src/test/run-pass/alt-pattern-no-type-params.rs | 2 +- src/test/run-pass/alt-phi.rs | 2 +- src/test/run-pass/alt-str.rs | 2 +- src/test/run-pass/alt-tag.rs | 6 +++--- src/test/run-pass/box-pattern.rs | 2 +- src/test/run-pass/chan-leak.rs | 2 +- src/test/run-pass/conditional-compile.rs | 4 ++-- src/test/run-pass/constrained-type.rs | 2 +- src/test/run-pass/cycle-collection.rs | 4 ++-- src/test/run-pass/drop-on-empty-block-exit.rs | 2 +- src/test/run-pass/empty-tag.rs | 2 +- src/test/run-pass/enum-disr-val-pretty.rs | 2 +- src/test/run-pass/export-abstract-tag.rs | 2 +- src/test/run-pass/export-non-interference.rs | 2 +- src/test/run-pass/export-tag-variant.rs | 2 +- src/test/run-pass/export-unexported-dep.rs | 2 +- src/test/run-pass/expr-alt-struct.rs | 2 +- src/test/run-pass/expr-if-struct.rs | 2 +- src/test/run-pass/generic-ivec-leak.rs | 2 +- src/test/run-pass/generic-recursive-tag.rs | 2 +- src/test/run-pass/generic-tag-alt.rs | 2 +- src/test/run-pass/generic-tag-corruption.rs | 2 +- src/test/run-pass/generic-tag-local.rs | 2 +- src/test/run-pass/generic-tag-values.rs | 2 +- src/test/run-pass/generic-tag.rs | 2 +- src/test/run-pass/hashmap-memory.rs | 2 +- src/test/run-pass/init-res-into-things.rs | 2 +- src/test/run-pass/issue-687.rs | 2 +- src/test/run-pass/issue-980.rs | 4 ++-- src/test/run-pass/leak-tag-copy.rs | 2 +- src/test/run-pass/list.rs | 2 +- .../log-knows-the-names-of-variants-in-std.rs | 4 ++-- src/test/run-pass/log-knows-the-names-of-variants.rs | 6 +++--- src/test/run-pass/log-linearized.rs | 4 ++-- src/test/run-pass/mlist-cycle.rs | 2 +- src/test/run-pass/mlist.rs | 2 +- src/test/run-pass/mutual-recursion-group.rs | 8 ++++---- src/test/run-pass/nested-pattern.rs | 2 +- src/test/run-pass/nullary-or-pattern.rs | 2 +- src/test/run-pass/or-pattern.rs | 2 +- src/test/run-pass/record-pat.rs | 4 ++-- src/test/run-pass/resource-in-struct.rs | 2 +- src/test/run-pass/ret-none.rs | 2 +- src/test/run-pass/shadow.rs | 2 +- src/test/run-pass/shape_intrinsic_tag_then_rec.rs | 4 ++-- src/test/run-pass/simple-alt-generic-tag.rs | 2 +- src/test/run-pass/simple-generic-alt.rs | 2 +- src/test/run-pass/simple-generic-tag.rs | 2 +- src/test/run-pass/size-and-align.rs | 2 +- src/test/run-pass/structured-compare-recursive.rs | 2 +- src/test/run-pass/structured-compare.rs | 2 +- src/test/run-pass/tag-auto-disr-val-shape.rs | 2 +- src/test/run-pass/tag-disr-val-shape.rs | 10 +++++----- src/test/run-pass/tag-in-block.rs | 2 +- src/test/run-pass/tag-variant-disr-val.rs | 12 ++++++------ src/test/run-pass/tag.rs | 2 +- src/test/run-pass/task-comm-16.rs | 2 +- src/test/run-pass/uniq-cc-generic.rs | 4 ++-- src/test/run-pass/uniq-cc.rs | 4 ++-- src/test/run-pass/unique-containing-tag.rs | 2 +- src/test/run-pass/unique-in-tag.rs | 2 +- src/test/run-pass/unique-pat-2.rs | 2 +- src/test/run-pass/unique-pat-3.rs | 2 +- src/test/run-pass/use-uninit-alt.rs | 2 +- src/test/run-pass/use-uninit-alt2.rs | 2 +- src/test/run-pass/while-prelude-drop.rs | 2 +- 94 files changed, 135 insertions(+), 135 deletions(-) diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs index dc43c53ff30..a57cf3add14 100644 --- a/src/comp/syntax/print/pprust.rs +++ b/src/comp/syntax/print/pprust.rs @@ -451,7 +451,7 @@ fn print_item(s: ps, &&item: @ast::item) { } _ {} } - word(s.s, ";"); + word(s.s, ","); end(s); maybe_print_trailing_comment(s, v.span, none::); } diff --git a/src/test/bench/99bob-pattern.rs b/src/test/bench/99bob-pattern.rs index 5647bcb2703..ec27e3f0054 100644 --- a/src/test/bench/99bob-pattern.rs +++ b/src/test/bench/99bob-pattern.rs @@ -8,7 +8,7 @@ use std; import int; import str; -enum bottle { none; dual; single; multiple(int); } +enum bottle { none, dual, single, multiple(int), } fn show(b: bottle) { alt b { diff --git a/src/test/bench/shootout-binarytrees.rs b/src/test/bench/shootout-binarytrees.rs index c6a48003e95..4158238d19f 100644 --- a/src/test/bench/shootout-binarytrees.rs +++ b/src/test/bench/shootout-binarytrees.rs @@ -1,7 +1,7 @@ use std; import int; -enum tree { nil; node(~tree, ~tree, int); } +enum tree { nil, node(~tree, ~tree, int), } fn item_check(t: ~tree) -> int { alt *t { diff --git a/src/test/bench/sudoku.rs b/src/test/bench/sudoku.rs index 0b2b39d3ba5..c6896a20044 100644 --- a/src/test/bench/sudoku.rs +++ b/src/test/bench/sudoku.rs @@ -25,7 +25,7 @@ export grid_t, read_grid, solve_grid, write_grid; type grid = [[mutable u8]]; // exported type of sudoku grids -enum grid_t { grid_ctor(grid); } +enum grid_t { grid_ctor(grid), } // read a sudoku problem from file f fn read_grid(f: io::reader) -> grid_t { diff --git a/src/test/bench/task-perf-word-count.rs b/src/test/bench/task-perf-word-count.rs index 3c9ec7da895..357b062471e 100644 --- a/src/test/bench/task-perf-word-count.rs +++ b/src/test/bench/task-perf-word-count.rs @@ -52,11 +52,11 @@ mod map_reduce { type reducer = fn@(str, getter); enum ctrl_proto { - find_reducer(str, chan>); - mapper_done; + find_reducer(str, chan>), + mapper_done, } - enum reduce_proto { emit_val(int); done; ref; release; } + enum reduce_proto { emit_val(int), done, ref, release, } fn start_mappers(ctrl: chan, -inputs: [str]) -> [joinable_task] { diff --git a/src/test/compile-fail/alt-tag-nullary.rs b/src/test/compile-fail/alt-tag-nullary.rs index 6b6b052e714..878b872978e 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 -enum a { A; } -enum 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 b17b4ae1d54..b3aec729053 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 -enum a { A(int); } -enum 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 2c8805f39b3..449f12c2609 100644 --- a/src/test/compile-fail/bogus-tag.rs +++ b/src/test/compile-fail/bogus-tag.rs @@ -2,7 +2,7 @@ // error-pattern: unresolved -enum 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 310a487a0f4..7de42bf0a0d 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; - enum 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 e280ec481c7..7f0d7a90d38 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() { } - enum 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 42d5a0303be..88ecff8be21 100644 --- a/src/test/compile-fail/infinite-tag-type-recursion.rs +++ b/src/test/compile-fail/infinite-tag-type-recursion.rs @@ -3,6 +3,6 @@ // error-pattern: enum of infinite size -enum 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 9db73667ceb..1d80654781f 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 -enum 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 66c0c1bbdaa..06b5fbe7efa 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 -enum 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 894d15bdaa3..870b86d42c3 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 -enum 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 9eb0dda7817..997121f20ca 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 -enum 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 a73a1cd7862..4e708726864 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 -enum 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 4fb36a07c2a..05028b7a3ed 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 -enum 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-variant-cast-non-nullary.rs b/src/test/compile-fail/tag-variant-cast-non-nullary.rs index 167ae61b2ce..1a0b39c2b94 100644 --- a/src/test/compile-fail/tag-variant-cast-non-nullary.rs +++ b/src/test/compile-fail/tag-variant-cast-non-nullary.rs @@ -1,8 +1,8 @@ //error-pattern: non-scalar cast enum non_nullary { - nullary; - other(int); + nullary, + other(int), } fn main() { diff --git a/src/test/compile-fail/tag-variant-disr-dup.rs b/src/test/compile-fail/tag-variant-disr-dup.rs index 4ca253cebef..4c05060598b 100644 --- a/src/test/compile-fail/tag-variant-disr-dup.rs +++ b/src/test/compile-fail/tag-variant-disr-dup.rs @@ -3,9 +3,9 @@ // black and white have the same discriminator value ... enum color { - red = 0xff0000; - green = 0x00ff00; - blue = 0x0000ff; - black = 0x000000; - white = 0x000000; + red = 0xff0000, + green = 0x00ff00, + blue = 0x0000ff, + black = 0x000000, + white = 0x000000, } 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 b3847b440c0..01d098c7145 100644 --- a/src/test/compile-fail/tag-variant-disr-non-nullary.rs +++ b/src/test/compile-fail/tag-variant-disr-non-nullary.rs @@ -1,10 +1,10 @@ //error-pattern: discriminator values can only be used with a c-like enum enum color { - red = 0xff0000; - green = 0x00ff00; - blue = 0x0000ff; - black = 0x000000; - white = 0xffffff; - other (str); + red = 0xff0000, + green = 0x00ff00, + blue = 0x0000ff, + black = 0x000000, + white = 0xffffff, + other (str), } 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 74213309773..4f7d2c7d051 100644 --- a/src/test/compile-fail/tag-variant-disr-type-mismatch.rs +++ b/src/test/compile-fail/tag-variant-disr-type-mismatch.rs @@ -1,8 +1,8 @@ //error-pattern: mismatched types enum color { - red = 1u; - blue = 2; + red = 1u, + blue = 2, } fn main() {} diff --git a/src/test/compile-fail/unreachable-arm.rs b/src/test/compile-fail/unreachable-arm.rs index abc90108d75..89d31a41dcc 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 -enum 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/pretty/tag-blank-lines.rs b/src/test/pretty/tag-blank-lines.rs index 11c884d7c0c..e2e04d4f8de 100644 --- a/src/test/pretty/tag-blank-lines.rs +++ b/src/test/pretty/tag-blank-lines.rs @@ -1,8 +1,8 @@ // pp-exact enum foo { - foo; // a foo. - bar; + foo, // a foo. + bar, } fn main() { } diff --git a/src/test/run-fail/non-exhaustive-match.rs b/src/test/run-fail/non-exhaustive-match.rs index 4be3aec6490..c6127d178c8 100644 --- a/src/test/run-fail/non-exhaustive-match.rs +++ b/src/test/run-fail/non-exhaustive-match.rs @@ -4,6 +4,6 @@ // -*- rust -*- // error-pattern:non-exhaustive match failure -enum t { a; b; } +enum t { a, b, } fn main() { let x = a; alt x { b { } } } diff --git a/src/test/run-pass/alias-uninit-value.rs b/src/test/run-pass/alias-uninit-value.rs index d023ec67b49..01b850dabeb 100644 --- a/src/test/run-pass/alias-uninit-value.rs +++ b/src/test/run-pass/alias-uninit-value.rs @@ -5,7 +5,7 @@ use std; import option; import option::none; -enum sty { ty_nil; } +enum sty { ty_nil, } type raw_t = {struct: sty, cname: option::t, hash: uint}; diff --git a/src/test/run-pass/alloca-from-derived-tydesc.rs b/src/test/run-pass/alloca-from-derived-tydesc.rs index 8b7561c78b7..73de058949a 100644 --- a/src/test/run-pass/alloca-from-derived-tydesc.rs +++ b/src/test/run-pass/alloca-from-derived-tydesc.rs @@ -1,4 +1,4 @@ -enum option { some(T); none; } +enum option { some(T), none, } type r = {mutable v: [option]}; diff --git a/src/test/run-pass/alt-path.rs b/src/test/run-pass/alt-path.rs index c474b1d7df2..cd7497aeda4 100644 --- a/src/test/run-pass/alt-path.rs +++ b/src/test/run-pass/alt-path.rs @@ -1,7 +1,7 @@ mod m1 { - enum foo { foo1; foo2; } + enum foo { foo1, foo2, } } fn bar(x: m1::foo) { alt x { m1::foo1 { } } } diff --git a/src/test/run-pass/alt-pattern-drop.rs b/src/test/run-pass/alt-pattern-drop.rs index 73af1bacf57..81ea2a2d774 100644 --- a/src/test/run-pass/alt-pattern-drop.rs +++ b/src/test/run-pass/alt-pattern-drop.rs @@ -5,7 +5,7 @@ use std; import std::dbg; -enum t { make_t(@int); clam; } +enum t { make_t(@int), clam, } fn foo(s: @int) { let count = dbg::refcount(s); diff --git a/src/test/run-pass/alt-pattern-no-type-params.rs b/src/test/run-pass/alt-pattern-no-type-params.rs index 1c5355f816a..9a9acad43fd 100644 --- a/src/test/run-pass/alt-pattern-no-type-params.rs +++ b/src/test/run-pass/alt-pattern-no-type-params.rs @@ -1,4 +1,4 @@ -enum maybe { nothing; just(T); } +enum maybe { nothing, just(T), } fn foo(x: maybe) { alt x { nothing { #error("A"); } just(a) { #error("B"); } } diff --git a/src/test/run-pass/alt-phi.rs b/src/test/run-pass/alt-phi.rs index fe7073d65f4..11f0ff87a68 100644 --- a/src/test/run-pass/alt-phi.rs +++ b/src/test/run-pass/alt-phi.rs @@ -1,6 +1,6 @@ -enum thing { a; b; c; } +enum thing { a, b, c, } fn foo(it: block(int)) { it(10); } diff --git a/src/test/run-pass/alt-str.rs b/src/test/run-pass/alt-str.rs index 9982da07d1e..6b7a3e6c279 100644 --- a/src/test/run-pass/alt-str.rs +++ b/src/test/run-pass/alt-str.rs @@ -3,7 +3,7 @@ fn main() { alt "test" { "not-test" { fail; } "test" { } _ { fail; } } - enum t { tag1(str); tag2; } + enum t { tag1(str), tag2, } alt tag1("test") { diff --git a/src/test/run-pass/alt-tag.rs b/src/test/run-pass/alt-tag.rs index 42a3d2aa842..11fad7375b5 100644 --- a/src/test/run-pass/alt-tag.rs +++ b/src/test/run-pass/alt-tag.rs @@ -3,9 +3,9 @@ // -*- rust -*- enum color { - rgb(int, int, int); - rgba(int, int, int, int); - hsl(int, int, int); + rgb(int, int, int), + rgba(int, int, int, int), + hsl(int, int, int), } fn process(c: color) -> int { diff --git a/src/test/run-pass/box-pattern.rs b/src/test/run-pass/box-pattern.rs index 1b4f284c2a5..3eb95b70029 100644 --- a/src/test/run-pass/box-pattern.rs +++ b/src/test/run-pass/box-pattern.rs @@ -1,5 +1,5 @@ type foo = {a: int, b: uint}; -enum bar { u(@foo); w(int); } +enum bar { u(@foo), w(int), } fn main() { assert (alt u(@{a: 10, b: 40u}) { diff --git a/src/test/run-pass/chan-leak.rs b/src/test/run-pass/chan-leak.rs index effe019ccd3..d520a1ff3a3 100644 --- a/src/test/run-pass/chan-leak.rs +++ b/src/test/run-pass/chan-leak.rs @@ -8,7 +8,7 @@ import comm; import comm::port; import comm::recv; -enum request { quit; close(chan); } +enum request { quit, close(chan), } type ctx = chan; diff --git a/src/test/run-pass/conditional-compile.rs b/src/test/run-pass/conditional-compile.rs index 60955f88f27..0585795c131 100644 --- a/src/test/run-pass/conditional-compile.rs +++ b/src/test/run-pass/conditional-compile.rs @@ -20,9 +20,9 @@ type t = int; type t = bool; #[cfg(bogus)] -enum tg { foo; } +enum tg { foo, } -enum tg { bar; } +enum tg { bar, } #[cfg(bogus)] resource r(i: int) { } diff --git a/src/test/run-pass/constrained-type.rs b/src/test/run-pass/constrained-type.rs index 32602cd2e48..c29bcbdfee2 100644 --- a/src/test/run-pass/constrained-type.rs +++ b/src/test/run-pass/constrained-type.rs @@ -1,6 +1,6 @@ // -*- rust -*- -enum list { cons(int, @list); nil; } +enum list { cons(int, @list), nil, } type bubu = {x: int, y: int}; diff --git a/src/test/run-pass/cycle-collection.rs b/src/test/run-pass/cycle-collection.rs index d0c85d6774f..dd00fcbbbef 100644 --- a/src/test/run-pass/cycle-collection.rs +++ b/src/test/run-pass/cycle-collection.rs @@ -1,6 +1,6 @@ enum taggy { - cons(@mutable taggy); - nil; + cons(@mutable taggy), + nil, } fn f() { diff --git a/src/test/run-pass/drop-on-empty-block-exit.rs b/src/test/run-pass/drop-on-empty-block-exit.rs index ec9627452cd..3632e8833d1 100644 --- a/src/test/run-pass/drop-on-empty-block-exit.rs +++ b/src/test/run-pass/drop-on-empty-block-exit.rs @@ -1,5 +1,5 @@ -enum t { foo(@int); } +enum t { foo(@int), } fn main() { let tt = foo(@10); alt tt { foo(z) { } } } diff --git a/src/test/run-pass/empty-tag.rs b/src/test/run-pass/empty-tag.rs index ba7941e680e..63201e5c796 100644 --- a/src/test/run-pass/empty-tag.rs +++ b/src/test/run-pass/empty-tag.rs @@ -1,4 +1,4 @@ -enum chan { chan_t; } +enum chan { chan_t, } fn wrapper3(i: chan) { assert i == chan_t; diff --git a/src/test/run-pass/enum-disr-val-pretty.rs b/src/test/run-pass/enum-disr-val-pretty.rs index d051aa233d6..afb63b7f406 100644 --- a/src/test/run-pass/enum-disr-val-pretty.rs +++ b/src/test/run-pass/enum-disr-val-pretty.rs @@ -1,6 +1,6 @@ // pp-exact -enum color { red = 1; green; blue; imaginary = -1; } +enum color { red = 1, green, blue, imaginary = -1, } fn main() { test_color(red, 1, "red"); diff --git a/src/test/run-pass/export-abstract-tag.rs b/src/test/run-pass/export-abstract-tag.rs index cb820bc26ce..6a840037641 100644 --- a/src/test/run-pass/export-abstract-tag.rs +++ b/src/test/run-pass/export-abstract-tag.rs @@ -5,7 +5,7 @@ mod foo { export t; export f; - enum t { t1; } + enum t { t1, } fn f() -> t { ret t1; } } diff --git a/src/test/run-pass/export-non-interference.rs b/src/test/run-pass/export-non-interference.rs index 630fb2919bf..5a3928cfd72 100644 --- a/src/test/run-pass/export-non-interference.rs +++ b/src/test/run-pass/export-non-interference.rs @@ -2,6 +2,6 @@ export foo; export main; -enum list_cell { cons(@list_cell); } +enum list_cell { cons(@list_cell), } fn main() { } diff --git a/src/test/run-pass/export-tag-variant.rs b/src/test/run-pass/export-tag-variant.rs index 9862fc1fbd7..ccdb235164c 100644 --- a/src/test/run-pass/export-tag-variant.rs +++ b/src/test/run-pass/export-tag-variant.rs @@ -2,7 +2,7 @@ mod foo { export t1; - enum t { t1; } + enum t { t1, } } fn main() { let v = foo::t1; } diff --git a/src/test/run-pass/export-unexported-dep.rs b/src/test/run-pass/export-unexported-dep.rs index 71f2f9ca900..856f568e788 100644 --- a/src/test/run-pass/export-unexported-dep.rs +++ b/src/test/run-pass/export-unexported-dep.rs @@ -6,7 +6,7 @@ mod foo { export g; // not exported - enum t { t1; t2; } + enum t { t1, t2, } fn f() -> t { ret t1; } diff --git a/src/test/run-pass/expr-alt-struct.rs b/src/test/run-pass/expr-alt-struct.rs index cee1bb22dee..def9b607afe 100644 --- a/src/test/run-pass/expr-alt-struct.rs +++ b/src/test/run-pass/expr-alt-struct.rs @@ -10,7 +10,7 @@ fn test_rec() { } fn test_tag() { - enum mood { happy; sad; } + enum mood { happy, sad, } let rs = alt true { true { happy } false { sad } }; assert (rs == happy); } diff --git a/src/test/run-pass/expr-if-struct.rs b/src/test/run-pass/expr-if-struct.rs index af19923d85d..99787004b75 100644 --- a/src/test/run-pass/expr-if-struct.rs +++ b/src/test/run-pass/expr-if-struct.rs @@ -10,7 +10,7 @@ fn test_rec() { } fn test_tag() { - enum mood { happy; sad; } + enum mood { happy, sad, } let rs = if true { happy } else { sad }; assert (rs == happy); } diff --git a/src/test/run-pass/generic-ivec-leak.rs b/src/test/run-pass/generic-ivec-leak.rs index fe7ca611218..1e7de587fb9 100644 --- a/src/test/run-pass/generic-ivec-leak.rs +++ b/src/test/run-pass/generic-ivec-leak.rs @@ -1,4 +1,4 @@ -enum wrapper { wrapped(T); } +enum wrapper { wrapped(T), } fn main() { let w = wrapped([1, 2, 3, 4, 5]); } diff --git a/src/test/run-pass/generic-recursive-tag.rs b/src/test/run-pass/generic-recursive-tag.rs index a39b5689970..46bc5223ec7 100644 --- a/src/test/run-pass/generic-recursive-tag.rs +++ b/src/test/run-pass/generic-recursive-tag.rs @@ -1,6 +1,6 @@ -enum list { cons(@T, @list); nil; } +enum list { cons(@T, @list), nil, } fn main() { let a: list = diff --git a/src/test/run-pass/generic-tag-alt.rs b/src/test/run-pass/generic-tag-alt.rs index d3b0060a1ee..ebbbb87d3e2 100644 --- a/src/test/run-pass/generic-tag-alt.rs +++ b/src/test/run-pass/generic-tag-alt.rs @@ -1,6 +1,6 @@ -enum foo { arm(T); } +enum foo { arm(T), } fn altfoo(f: foo) { let hit = false; diff --git a/src/test/run-pass/generic-tag-corruption.rs b/src/test/run-pass/generic-tag-corruption.rs index 2487129ecae..f1313f8cb6b 100644 --- a/src/test/run-pass/generic-tag-corruption.rs +++ b/src/test/run-pass/generic-tag-corruption.rs @@ -2,6 +2,6 @@ // This causes memory corruption in stage0. -enum thing { some(K); } +enum thing { some(K), } fn main() { let x = some("hi"); } diff --git a/src/test/run-pass/generic-tag-local.rs b/src/test/run-pass/generic-tag-local.rs index dd03f3852a9..d36309548c5 100644 --- a/src/test/run-pass/generic-tag-local.rs +++ b/src/test/run-pass/generic-tag-local.rs @@ -1,5 +1,5 @@ -enum clam { a(T); } +enum clam { a(T), } fn main() { let c = a(3); } diff --git a/src/test/run-pass/generic-tag-values.rs b/src/test/run-pass/generic-tag-values.rs index 6bedc222024..d8c039fa413 100644 --- a/src/test/run-pass/generic-tag-values.rs +++ b/src/test/run-pass/generic-tag-values.rs @@ -2,7 +2,7 @@ // -*- rust -*- -enum noption { some(T); } +enum noption { some(T), } fn main() { let nop: noption = some::(5); diff --git a/src/test/run-pass/generic-tag.rs b/src/test/run-pass/generic-tag.rs index 88eda46ab17..cf134c1efde 100644 --- a/src/test/run-pass/generic-tag.rs +++ b/src/test/run-pass/generic-tag.rs @@ -1,5 +1,5 @@ -enum option { some(@T); none; } +enum option { some(@T), none, } fn main() { let a: option = some::(@10); a = none::; } diff --git a/src/test/run-pass/hashmap-memory.rs b/src/test/run-pass/hashmap-memory.rs index 333779fbc6d..777b56c7520 100644 --- a/src/test/run-pass/hashmap-memory.rs +++ b/src/test/run-pass/hashmap-memory.rs @@ -30,7 +30,7 @@ mod map_reduce { type mapper = native fn(str, putter); - enum ctrl_proto { find_reducer([u8], chan); mapper_done; } + enum ctrl_proto { find_reducer([u8], chan), mapper_done, } fn start_mappers(ctrl: chan, inputs: [str]) { for i: str in inputs { diff --git a/src/test/run-pass/init-res-into-things.rs b/src/test/run-pass/init-res-into-things.rs index 556ad530c34..3b3836dd32e 100644 --- a/src/test/run-pass/init-res-into-things.rs +++ b/src/test/run-pass/init-res-into-things.rs @@ -23,7 +23,7 @@ fn test_rec() { fn test_tag() { enum t { - t0(r); + t0(r), } let i = @mutable 0; diff --git a/src/test/run-pass/issue-687.rs b/src/test/run-pass/issue-687.rs index 18f2978a018..f0926afe759 100644 --- a/src/test/run-pass/issue-687.rs +++ b/src/test/run-pass/issue-687.rs @@ -7,7 +7,7 @@ import comm::port; import comm::recv; import comm::send; -enum msg { closed; received([u8]); } +enum msg { closed, received([u8]), } fn producer(c: chan<[u8]>) { send(c, [1u8, 2u8, 3u8, 4u8]); diff --git a/src/test/run-pass/issue-980.rs b/src/test/run-pass/issue-980.rs index 4f4ed283265..ddbc648ae0a 100644 --- a/src/test/run-pass/issue-980.rs +++ b/src/test/run-pass/issue-980.rs @@ -1,6 +1,6 @@ enum maybe_pointy { - no_pointy; - yes_pointy(@pointy); + no_pointy, + yes_pointy(@pointy), } type pointy = { diff --git a/src/test/run-pass/leak-tag-copy.rs b/src/test/run-pass/leak-tag-copy.rs index eca6134f94d..515b9691b22 100644 --- a/src/test/run-pass/leak-tag-copy.rs +++ b/src/test/run-pass/leak-tag-copy.rs @@ -1,5 +1,5 @@ -enum t { a; b(@int); } +enum t { a, b(@int), } fn main() { let x = b(@10); x = a; } diff --git a/src/test/run-pass/list.rs b/src/test/run-pass/list.rs index e0f372cf726..5916ed1d226 100644 --- a/src/test/run-pass/list.rs +++ b/src/test/run-pass/list.rs @@ -2,6 +2,6 @@ // -*- rust -*- -enum list { cons(int, @list); nil; } +enum list { cons(int, @list), nil, } fn main() { cons(10, @cons(11, @cons(12, @nil))); } diff --git a/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs b/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs index ca4a40074b6..3cdb6c3335a 100644 --- a/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs +++ b/src/test/run-pass/log-knows-the-names-of-variants-in-std.rs @@ -2,8 +2,8 @@ use std; import std::list; enum foo { - a(uint); - b(str); + a(uint), + b(str), } fn check_log(exp: str, v: T) { diff --git a/src/test/run-pass/log-knows-the-names-of-variants.rs b/src/test/run-pass/log-knows-the-names-of-variants.rs index 6850ad761e3..78902cf2520 100644 --- a/src/test/run-pass/log-knows-the-names-of-variants.rs +++ b/src/test/run-pass/log-knows-the-names-of-variants.rs @@ -1,7 +1,7 @@ enum foo { - a(uint); - b(str); - c; + a(uint), + b(str), + c, } fn main() { diff --git a/src/test/run-pass/log-linearized.rs b/src/test/run-pass/log-linearized.rs index 725643f7317..0a7f0b28340 100644 --- a/src/test/run-pass/log-linearized.rs +++ b/src/test/run-pass/log-linearized.rs @@ -1,8 +1,8 @@ // Tests that shapes respect linearize_ty_params(). enum option { - none; - some(T); + none, + some(T), } type smallintmap = @{mutable v: [mutable option]}; diff --git a/src/test/run-pass/mlist-cycle.rs b/src/test/run-pass/mlist-cycle.rs index b44514021a4..455368c4771 100644 --- a/src/test/run-pass/mlist-cycle.rs +++ b/src/test/run-pass/mlist-cycle.rs @@ -4,7 +4,7 @@ use std; type cell = {mutable c: @list}; -enum list { link(@cell); nil; } +enum list { link(@cell), nil, } fn main() { let first: @cell = @{mutable c: @nil()}; diff --git a/src/test/run-pass/mlist.rs b/src/test/run-pass/mlist.rs index 8746dfc949d..cfb423553d4 100644 --- a/src/test/run-pass/mlist.rs +++ b/src/test/run-pass/mlist.rs @@ -1,4 +1,4 @@ // -*- rust -*- -enum mlist { cons(int, @mlist); nil; } +enum mlist { cons(int, @mlist), nil, } fn main() { cons(10, @cons(11, @cons(12, @nil))); } diff --git a/src/test/run-pass/mutual-recursion-group.rs b/src/test/run-pass/mutual-recursion-group.rs index 516a04203e3..e708fe34310 100644 --- a/src/test/run-pass/mutual-recursion-group.rs +++ b/src/test/run-pass/mutual-recursion-group.rs @@ -2,12 +2,12 @@ // -*- rust -*- -enum colour { red; green; blue; } +enum colour { red, green, blue, } -enum tree { children(@list); leaf(colour); } +enum tree { children(@list), leaf(colour), } -enum list { cons(@tree, @list); nil; } +enum list { cons(@tree, @list), nil, } -enum small_list { kons(int, @small_list); neel; } +enum small_list { kons(int, @small_list), neel, } fn main() { } diff --git a/src/test/run-pass/nested-pattern.rs b/src/test/run-pass/nested-pattern.rs index af8b2632ece..2bd5e9ff330 100644 --- a/src/test/run-pass/nested-pattern.rs +++ b/src/test/run-pass/nested-pattern.rs @@ -6,7 +6,7 @@ import option; import option::some; import option::none; -enum t { foo(int, uint); bar(int, option::t); } +enum t { foo(int, uint), bar(int, option::t), } fn nested(o: t) { alt o { diff --git a/src/test/run-pass/nullary-or-pattern.rs b/src/test/run-pass/nullary-or-pattern.rs index 6efbafa1c07..87109cfb1d6 100644 --- a/src/test/run-pass/nullary-or-pattern.rs +++ b/src/test/run-pass/nullary-or-pattern.rs @@ -1,4 +1,4 @@ -enum blah { a; b; } +enum blah { a, b, } fn or_alt(q: blah) -> int { alt q { a | b { 42 } } diff --git a/src/test/run-pass/or-pattern.rs b/src/test/run-pass/or-pattern.rs index 6b78b381f00..8419fc6ee67 100644 --- a/src/test/run-pass/or-pattern.rs +++ b/src/test/run-pass/or-pattern.rs @@ -1,4 +1,4 @@ -enum blah { a(int, int, uint); b(int, int); c; } +enum blah { a(int, int, uint), b(int, int), c, } fn or_alt(q: blah) -> int { alt q { a(x, y, _) | b(x, y) { ret x + y; } c { ret 0; } } diff --git a/src/test/run-pass/record-pat.rs b/src/test/run-pass/record-pat.rs index d06bfe9c720..d114c9e995d 100644 --- a/src/test/run-pass/record-pat.rs +++ b/src/test/run-pass/record-pat.rs @@ -1,6 +1,6 @@ -enum t1 { a(int); b(uint); } +enum t1 { a(int), b(uint), } type t2 = {x: t1, y: int}; -enum t3 { c(t2, uint); } +enum t3 { c(t2, uint), } fn m(in: t3) -> int { alt in { diff --git a/src/test/run-pass/resource-in-struct.rs b/src/test/run-pass/resource-in-struct.rs index 81dc1680442..f2dbb04f1b2 100644 --- a/src/test/run-pass/resource-in-struct.rs +++ b/src/test/run-pass/resource-in-struct.rs @@ -5,7 +5,7 @@ type closable = @mutable bool; resource close_res(i: closable) { *i = false; } -enum option { none; some(T); } +enum option { none, some(T), } fn sink(res: option) { } diff --git a/src/test/run-pass/ret-none.rs b/src/test/run-pass/ret-none.rs index a32e09c139e..468dbf5f3f2 100644 --- a/src/test/run-pass/ret-none.rs +++ b/src/test/run-pass/ret-none.rs @@ -1,6 +1,6 @@ -enum option { none; some(T); } +enum option { none, some(T), } fn f() -> option { ret none; } diff --git a/src/test/run-pass/shadow.rs b/src/test/run-pass/shadow.rs index 05215d5e3f6..fd7edefb390 100644 --- a/src/test/run-pass/shadow.rs +++ b/src/test/run-pass/shadow.rs @@ -16,6 +16,6 @@ fn foo(c: [int]) { } } -enum t { none; some(T); } +enum t { none, some(T), } fn main() { let x = 10; let x = x + 20; assert (x == 30); foo([]); } diff --git a/src/test/run-pass/shape_intrinsic_tag_then_rec.rs b/src/test/run-pass/shape_intrinsic_tag_then_rec.rs index f40309ec3a1..9777de4b146 100644 --- a/src/test/run-pass/shape_intrinsic_tag_then_rec.rs +++ b/src/test/run-pass/shape_intrinsic_tag_then_rec.rs @@ -10,8 +10,8 @@ import option; enum opt_span { //hack (as opposed to option::t), to make `span` compile - os_none; - os_some(@span); + os_none, + os_some(@span), } type span = {lo: uint, hi: uint, expanded_from: opt_span}; type spanned = { data: T, span: span }; diff --git a/src/test/run-pass/simple-alt-generic-tag.rs b/src/test/run-pass/simple-alt-generic-tag.rs index 3e7df306361..3b1e1811ba8 100644 --- a/src/test/run-pass/simple-alt-generic-tag.rs +++ b/src/test/run-pass/simple-alt-generic-tag.rs @@ -1,6 +1,6 @@ -enum opt { none; } +enum opt { none, } fn main() { let x = none::; diff --git a/src/test/run-pass/simple-generic-alt.rs b/src/test/run-pass/simple-generic-alt.rs index 743277d461c..4e30d44304a 100644 --- a/src/test/run-pass/simple-generic-alt.rs +++ b/src/test/run-pass/simple-generic-alt.rs @@ -1,5 +1,5 @@ -enum clam { a(T); } +enum clam { a(T), } fn main() { let c = a(2); alt c { a::(_) { } } } diff --git a/src/test/run-pass/simple-generic-tag.rs b/src/test/run-pass/simple-generic-tag.rs index 3a0843d8e91..0f9e3308faf 100644 --- a/src/test/run-pass/simple-generic-tag.rs +++ b/src/test/run-pass/simple-generic-tag.rs @@ -1,5 +1,5 @@ -enum clam { a(T); } +enum clam { a(T), } fn main() { } diff --git a/src/test/run-pass/size-and-align.rs b/src/test/run-pass/size-and-align.rs index bb4afdb4c3d..ce70efa318e 100644 --- a/src/test/run-pass/size-and-align.rs +++ b/src/test/run-pass/size-and-align.rs @@ -2,7 +2,7 @@ // -*- rust -*- -enum clam { a(T, int); b; } +enum clam { a(T, int), b, } fn uhoh(v: [clam]) { alt v[1] { diff --git a/src/test/run-pass/structured-compare-recursive.rs b/src/test/run-pass/structured-compare-recursive.rs index 72d75a33bf0..269cbf0363b 100644 --- a/src/test/run-pass/structured-compare-recursive.rs +++ b/src/test/run-pass/structured-compare-recursive.rs @@ -1,5 +1,5 @@ -enum taggy { foo(@taggy); bar; } +enum taggy { foo(@taggy), bar, } fn main() { assert (bar <= bar); } diff --git a/src/test/run-pass/structured-compare.rs b/src/test/run-pass/structured-compare.rs index 014196c8758..aebebec1299 100644 --- a/src/test/run-pass/structured-compare.rs +++ b/src/test/run-pass/structured-compare.rs @@ -1,6 +1,6 @@ -enum foo { large; small; } +enum foo { large, small, } fn main() { let a = {x: 1, y: 2, z: 3}; diff --git a/src/test/run-pass/tag-auto-disr-val-shape.rs b/src/test/run-pass/tag-auto-disr-val-shape.rs index c4952629d64..7f6faf96ed4 100644 --- a/src/test/run-pass/tag-auto-disr-val-shape.rs +++ b/src/test/run-pass/tag-auto-disr-val-shape.rs @@ -1,6 +1,6 @@ // xfail-test -enum color { red; green; blue; black; white; } +enum color { red, green, blue, black, white, } fn main() { assert (uint::to_str(red as uint, 10) == #fmt["%?", red]); diff --git a/src/test/run-pass/tag-disr-val-shape.rs b/src/test/run-pass/tag-disr-val-shape.rs index 0c8b23e3dc3..0d8d48d58b8 100644 --- a/src/test/run-pass/tag-disr-val-shape.rs +++ b/src/test/run-pass/tag-disr-val-shape.rs @@ -1,11 +1,11 @@ // xfail-pretty Issue #1510 enum color { - red = 0xff0000; - green = 0x00ff00; - blue = 0x0000ff; - black = 0x000000; - white = 0xFFFFFF; + red = 0xff0000, + green = 0x00ff00, + blue = 0x0000ff, + black = 0x000000, + white = 0xFFFFFF, } fn main() { diff --git a/src/test/run-pass/tag-in-block.rs b/src/test/run-pass/tag-in-block.rs index fe74c1e5ed7..c08d440874d 100644 --- a/src/test/run-pass/tag-in-block.rs +++ b/src/test/run-pass/tag-in-block.rs @@ -2,7 +2,7 @@ fn foo() { fn zed(z: bar) { } - enum bar { nil; } + enum bar { nil, } fn baz() { zed(nil); } } diff --git a/src/test/run-pass/tag-variant-disr-val.rs b/src/test/run-pass/tag-variant-disr-val.rs index 65deb3ed0cb..003d0c6bd6a 100644 --- a/src/test/run-pass/tag-variant-disr-val.rs +++ b/src/test/run-pass/tag-variant-disr-val.rs @@ -1,10 +1,10 @@ enum color { - red = 0xff0000; - green = 0x00ff00; - blue = 0x0000ff; - black = 0x000000; - white = 0xFFFFFF; - imaginary = -1; + red = 0xff0000, + green = 0x00ff00, + blue = 0x0000ff, + black = 0x000000, + white = 0xFFFFFF, + imaginary = -1, } fn main() { diff --git a/src/test/run-pass/tag.rs b/src/test/run-pass/tag.rs index 76d6b8069db..1793f5f22a2 100644 --- a/src/test/run-pass/tag.rs +++ b/src/test/run-pass/tag.rs @@ -2,7 +2,7 @@ // -*- rust -*- -enum colour { red(int, int); green; } +enum colour { red(int, int), green, } fn f() { let x = red(1, 2); let y = green; assert (x != y); } diff --git a/src/test/run-pass/task-comm-16.rs b/src/test/run-pass/task-comm-16.rs index 63e39789657..2c85462245c 100644 --- a/src/test/run-pass/task-comm-16.rs +++ b/src/test/run-pass/task-comm-16.rs @@ -50,7 +50,7 @@ fn test_str() { } fn test_tag() { - enum t { tag1; tag2(int); tag3(int, u8, char); } + enum t { tag1, tag2(int), tag3(int, u8, char), } let po = port(); let ch = chan(po); send(ch, tag1); diff --git a/src/test/run-pass/uniq-cc-generic.rs b/src/test/run-pass/uniq-cc-generic.rs index 536696d18d1..9666018d814 100644 --- a/src/test/run-pass/uniq-cc-generic.rs +++ b/src/test/run-pass/uniq-cc-generic.rs @@ -1,6 +1,6 @@ enum maybe_pointy { - none; - p(@pointy); + none, + p(@pointy), } type pointy = { diff --git a/src/test/run-pass/uniq-cc.rs b/src/test/run-pass/uniq-cc.rs index de3ef188fb3..ad4581e12cd 100644 --- a/src/test/run-pass/uniq-cc.rs +++ b/src/test/run-pass/uniq-cc.rs @@ -1,6 +1,6 @@ enum maybe_pointy { - none; - p(@pointy); + none, + p(@pointy), } type pointy = { diff --git a/src/test/run-pass/unique-containing-tag.rs b/src/test/run-pass/unique-containing-tag.rs index 88afe81b926..47c13632524 100644 --- a/src/test/run-pass/unique-containing-tag.rs +++ b/src/test/run-pass/unique-containing-tag.rs @@ -1,5 +1,5 @@ fn main() { - enum t { t1(int); t2(int); } + enum t { t1(int), t2(int), } let x = ~t1(10); diff --git a/src/test/run-pass/unique-in-tag.rs b/src/test/run-pass/unique-in-tag.rs index 443193f342e..d65143285bd 100644 --- a/src/test/run-pass/unique-in-tag.rs +++ b/src/test/run-pass/unique-in-tag.rs @@ -1,5 +1,5 @@ fn test1() { - enum bar { u(~int); w(int); } + enum bar { u(~int), w(int), } let x = u(~10); assert alt x { diff --git a/src/test/run-pass/unique-pat-2.rs b/src/test/run-pass/unique-pat-2.rs index f461560ff84..169ce721de7 100644 --- a/src/test/run-pass/unique-pat-2.rs +++ b/src/test/run-pass/unique-pat-2.rs @@ -1,6 +1,6 @@ type foo = {a: int, b: uint}; -enum bar { u(~foo); w(int); } +enum bar { u(~foo), w(int), } fn main() { assert (alt u(~{a: 10, b: 40u}) { diff --git a/src/test/run-pass/unique-pat-3.rs b/src/test/run-pass/unique-pat-3.rs index cb744685b05..034404f7a3f 100644 --- a/src/test/run-pass/unique-pat-3.rs +++ b/src/test/run-pass/unique-pat-3.rs @@ -1,5 +1,5 @@ -enum bar { u(~int); w(int); } +enum bar { u(~int), w(int), } fn main() { assert alt u(~10) { diff --git a/src/test/run-pass/use-uninit-alt.rs b/src/test/run-pass/use-uninit-alt.rs index b0a5e79c6f9..579b939ccb4 100644 --- a/src/test/run-pass/use-uninit-alt.rs +++ b/src/test/run-pass/use-uninit-alt.rs @@ -6,6 +6,6 @@ fn foo(o: myoption) -> int { ret x; } -enum myoption { none; some(T); } +enum myoption { none, some(T), } fn main() { log(debug, 5); } diff --git a/src/test/run-pass/use-uninit-alt2.rs b/src/test/run-pass/use-uninit-alt2.rs index 106c9af5f4c..24b7e19da5b 100644 --- a/src/test/run-pass/use-uninit-alt2.rs +++ b/src/test/run-pass/use-uninit-alt2.rs @@ -6,6 +6,6 @@ fn foo(o: myoption) -> int { ret x; } -enum myoption { none; some(T); } +enum myoption { none, some(T), } fn main() { log(debug, 5); } diff --git a/src/test/run-pass/while-prelude-drop.rs b/src/test/run-pass/while-prelude-drop.rs index c2f84ada888..b248eb332f6 100644 --- a/src/test/run-pass/while-prelude-drop.rs +++ b/src/test/run-pass/while-prelude-drop.rs @@ -1,5 +1,5 @@ -enum t { a; b(str); } +enum t { a, b(str), } fn make(i: int) -> t { if i > 10 { ret a; }