Skip to content

Commit 7b1a8f0

Browse files
committed
Additional ; to , changes, disable "tag" and ";" in parser. Close #1430. Close #1428.
1 parent a23f188 commit 7b1a8f0

File tree

14 files changed

+23
-23
lines changed

14 files changed

+23
-23
lines changed

src/comp/middle/trans_alt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import trans_common::*;
2020
// range)
2121
enum opt {
2222
lit(@ast::expr),
23-
var(/* disr val */int, /* variant dids */{tg: def_id, var: def_id});
24-
range(@ast::expr, @ast::expr);
23+
var(/* disr val */int, /* variant dids */{tg: def_id, var: def_id}),
24+
range(@ast::expr, @ast::expr)
2525
}
2626
fn opt_eq(a: opt, b: opt) -> bool {
2727
alt (a, b) {

src/comp/middle/trans_common.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,21 +338,21 @@ enum block_kind {
338338
// in the source language. Since these blocks create variable scope, any
339339
// variables created in them that are still live at the end of the block
340340
// must be dropped and cleaned up when the block ends.
341-
SCOPE_BLOCK;
341+
SCOPE_BLOCK,
342342

343343

344344
// A basic block created from the body of a loop. Contains pointers to
345345
// which block to jump to in the case of "continue" or "break", with the
346346
// "continue" block optional, because "while" and "do while" don't support
347347
// "continue" (TODO: is this intentional?)
348-
LOOP_SCOPE_BLOCK(option::t<@block_ctxt>, @block_ctxt);
348+
LOOP_SCOPE_BLOCK(option::t<@block_ctxt>, @block_ctxt),
349349

350350

351351
// A non-scope block is a basic block created as a translation artifact
352352
// from translating code that expresses conditional logic rather than by
353353
// explicit { ... } block structure in the source language. It's called a
354354
// non-scope block because it doesn't introduce a new variable scope.
355-
NON_SCOPE_BLOCK;
355+
NON_SCOPE_BLOCK
356356
}
357357

358358

src/comp/syntax/parse/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2074,7 +2074,7 @@ fn parse_item_tag(p: parser, attrs: [ast::attribute]) -> @ast::item {
20742074
}
20752075

20762076
alt p.token {
2077-
token::SEMI | token::COMMA {
2077+
token::COMMA {
20782078
p.bump();
20792079
if p.token == token::RBRACE { done = true; }
20802080
}

src/libcore/comm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ type port_id = int;
6565
over other channels."
6666
)]
6767
enum chan<T: send> {
68-
chan_t(task::task, port_id);
68+
chan_t(task::task, port_id)
6969
}
7070

7171
resource port_ptr<T: send>(po: *rustrt::rust_port) {
@@ -89,7 +89,7 @@ resource port_ptr<T: send>(po: *rustrt::rust_port) {
8989
copied, both copies refer to the same port. \
9090
Ports may be associated with multiple <chan>s."
9191
)]
92-
enum port<T: send> { port_t(@port_ptr<T>); }
92+
enum port<T: send> { port_t(@port_ptr<T>) }
9393

9494
#[doc(
9595
brief = "Sends data over a channel. The sent data is moved \

src/libcore/either.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ enum t<T, U> {
1414
/* Variant: left */
1515
left(T),
1616
/* Variant: right */
17-
right(U),
17+
right(U)
1818
}
1919

2020
/* Section: Operations */

src/libcore/result.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ enum t<T, U> {
2323
2424
Contains the error value
2525
*/
26-
err(U),
26+
err(U)
2727
}
2828

2929
/* Section: Operations */

src/libstd/c_vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export ptr;
4343
*/
4444

4545
enum t<T> {
46-
t({ base: *mutable T, len: uint, rsrc: @dtor_res});
46+
t({ base: *mutable T, len: uint, rsrc: @dtor_res})
4747
}
4848

4949
resource dtor_res(dtor: option::t<fn@()>) {

src/libstd/extfmt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ import option::{some, none};
3939

4040
// Functions used by the fmt extension at compile time
4141
mod ct {
42-
enum signedness { signed, unsigned, }
43-
enum caseness { case_upper, case_lower, }
42+
enum signedness { signed, unsigned }
43+
enum caseness { case_upper, case_lower }
4444
enum ty {
4545
ty_bool,
4646
ty_str,

src/libstd/fun_treemap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Tag: tree_node
3333
*/
3434
enum tree_node<K, V> {
3535
empty,
36-
node(@K, @V, @tree_node<K, V>, @tree_node<K, V>),
36+
node(@K, @V, @tree_node<K, V>, @tree_node<K, V>)
3737
}
3838

3939
/* Section: Operations */

src/libstd/map.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ mod chained {
114114

115115
enum chain<K, V> {
116116
present(@entry<K, V>),
117-
absent,
117+
absent
118118
}
119119

120120
type t<K, V> = {
@@ -127,7 +127,7 @@ mod chained {
127127
enum search_result<K, V> {
128128
not_found,
129129
found_first(uint, @entry<K,V>),
130-
found_after(@entry<K,V>, @entry<K,V>),
130+
found_after(@entry<K,V>, @entry<K,V>)
131131
}
132132

133133
fn search_rem<K: copy, V: copy>(

src/libstd/treemap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type treemap<K, V> = @mutable tree_node<K, V>;
2828
/*
2929
Tag: tree_node
3030
*/
31-
enum tree_node<K, V> { empty, node(@K, @V, treemap<K, V>, treemap<K, V>), }
31+
enum tree_node<K, V> { empty, node(@K, @V, treemap<K, V>, treemap<K, V>) }
3232

3333
/* Section: Operations */
3434

src/rustdoc/gen.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ fn write_markdown(
3333
}
3434

3535
enum hlvl {
36-
h1 = 1;
37-
h2 = 2;
38-
h3 = 3;
36+
h1 = 1,
37+
h2 = 2,
38+
h3 = 3
3939
}
4040

4141
fn write_header(ctxt: ctxt, lvl: hlvl, title: str) {

src/test/compile-fail/unsafe-alt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// error-pattern:invalidate reference i
22

3-
enum foo { left({mutable x: int}); right(bool); }
3+
enum foo { left({mutable x: int}), right(bool) }
44

55
fn main() {
66
let x = left({mutable x: 10});

src/test/run-pass/issue-970.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
enum maybe_ordered_pair {
2-
yes({low: int, high: int} : less_than(*.low, *.high));
3-
no;
2+
yes({low: int, high: int} : less_than(*.low, *.high)),
3+
no
44
}
55
pure fn less_than(x: int, y: int) -> bool { ret x < y; }
66
fn main() { }

0 commit comments

Comments
 (0)