Skip to content

Commit b8c2136

Browse files
committed
---
yaml --- r: 53958 b: refs/heads/dist-snap c: b0bea10 h: refs/heads/master v: v3
1 parent d2e18d9 commit b8c2136

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: 44d4d6de762f3f9aae1fedcf454c66b79b3ad58d
10-
refs/heads/dist-snap: 049e1f9a1f60cfbc4136bd8496737e707ca05a42
10+
refs/heads/dist-snap: b0bea108983446aaa33ecabdd44954e03d5c65e0
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libsyntax/parse/parser.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -642,9 +642,9 @@ pub impl Parser {
642642
self.obsolete(*self.last_span, ObsoleteMutVector);
643643
}
644644

645-
// Parse the `* e` in `[ int * e ]`
645+
// Parse the `, ..e` in `[ int, ..e ]`
646646
// where `e` is a const expression
647-
let t = match self.maybe_parse_fixed_vstore_with_star() {
647+
let t = match self.maybe_parse_fixed_vstore() {
648648
None => ty_vec(mt),
649649
Some(suffix) => ty_fixed_length_vec(mt, suffix)
650650
};
@@ -815,8 +815,14 @@ pub impl Parser {
815815
})
816816
}
817817

818-
fn maybe_parse_fixed_vstore_with_star(&self) -> Option<@ast::expr> {
818+
fn maybe_parse_fixed_vstore(&self) -> Option<@ast::expr> {
819819
if self.eat(&token::BINOP(token::STAR)) {
820+
// XXX: Obsolete; remove after snapshot.
821+
Some(self.parse_expr())
822+
} else if *self.token == token::COMMA &&
823+
self.look_ahead(1) == token::DOTDOT {
824+
self.bump();
825+
self.bump();
820826
Some(self.parse_expr())
821827
} else {
822828
None

branches/dist-snap/src/libsyntax/print/pprust.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ pub fn print_type_ex(s: @ps, &&ty: @ast::Ty, print_colons: bool) {
424424
ast::m_imm => ()
425425
}
426426
print_type(s, mt.ty);
427-
word(s.s, ~" * ");
427+
word(s.s, ~", ..");
428428
print_expr(s, v);
429429
word(s.s, ~"]");
430430
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
use core::io::println;
2+
3+
static FOO: [int, ..3] = [1, 2, 3];
4+
5+
fn main() {
6+
println(fmt!("%d %d %d", FOO[0], FOO[1], FOO[2]));
7+
}
8+
9+
10+

0 commit comments

Comments
 (0)