Skip to content

Commit 34d3963

Browse files
committed
---
yaml --- r: 82987 b: refs/heads/auto c: 0cca359 h: refs/heads/master i: 82985: ffd476f 82983: 99ab238 v: v3
1 parent 26d816d commit 34d3963

File tree

6 files changed

+18
-45
lines changed

6 files changed

+18
-45
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 8db52a5c0eff35a87007533d57127e7afd91fb24
16+
refs/heads/auto: 0cca359da690d357ae3447c0e18cf5fab4ee8732
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/libsyntax/parse/parser.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ pub fn Parser(sess: @mut ParseSess,
309309
quote_depth: @mut 0,
310310
obsolete_set: @mut HashSet::new(),
311311
mod_path_stack: @mut ~[],
312-
open_braces: @mut ~[]
313312
}
314313
}
315314

@@ -338,8 +337,6 @@ pub struct Parser {
338337
obsolete_set: @mut HashSet<ObsoleteSyntax>,
339338
/// Used to determine the path to externally loaded source files
340339
mod_path_stack: @mut ~[@str],
341-
/// Stack of spans of open delimiters. Used for error message.
342-
open_braces: @mut ~[Span]
343340
}
344341

345342
#[unsafe_destructor]
@@ -2027,18 +2024,12 @@ impl Parser {
20272024

20282025
match *self.token {
20292026
token::EOF => {
2030-
for sp in self.open_braces.iter() {
2031-
self.span_note(*sp, "Did you mean to close this delimiter?");
2032-
}
2033-
// There shouldn't really be a span, but it's easier for the test runner
2034-
// if we give it one
2035-
self.fatal("This file contains an un-closed delimiter ");
2027+
self.fatal("file ended with unbalanced delimiters");
20362028
}
20372029
token::LPAREN | token::LBRACE | token::LBRACKET => {
20382030
let close_delim = token::flip_delimiter(&*self.token);
20392031

20402032
// Parse the open delimiter.
2041-
(*self.open_braces).push(*self.span);
20422033
let mut result = ~[parse_any_tt_tok(self)];
20432034

20442035
let trees =
@@ -2049,7 +2040,6 @@ impl Parser {
20492040

20502041
// Parse the close delimiter.
20512042
result.push(parse_any_tt_tok(self));
2052-
self.open_braces.pop();
20532043

20542044
tt_delim(@mut result)
20552045
}

branches/auto/src/libsyntax/parse/token.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -499,30 +499,11 @@ fn mk_fresh_ident_interner() -> @ident_interner {
499499
@interner::StrInterner::prefill(init_vec)
500500
}
501501

502-
// NOTE remove stage0 pub'ed special cases after next snapshot.
503-
#[cfg(stage0)]
504-
pub static SELF_KEYWORD_NAME: uint = 8;
505-
#[cfg(not(stage0))]
506502
static SELF_KEYWORD_NAME: uint = 8;
507-
#[cfg(stage0)]
508-
pub static STATIC_KEYWORD_NAME: uint = 27;
509-
#[cfg(not(stage0))]
510503
static STATIC_KEYWORD_NAME: uint = 27;
511-
#[cfg(stage0)]
512-
pub static STRICT_KEYWORD_START: uint = 32;
513-
#[cfg(not(stage0))]
514504
static STRICT_KEYWORD_START: uint = 32;
515-
#[cfg(stage0)]
516-
pub static STRICT_KEYWORD_FINAL: uint = 64;
517-
#[cfg(not(stage0))]
518505
static STRICT_KEYWORD_FINAL: uint = 64;
519-
#[cfg(stage0)]
520-
pub static RESERVED_KEYWORD_START: uint = 65;
521-
#[cfg(not(stage0))]
522506
static RESERVED_KEYWORD_START: uint = 65;
523-
#[cfg(stage0)]
524-
pub static RESERVED_KEYWORD_FINAL: uint = 71;
525-
#[cfg(not(stage0))]
526507
static RESERVED_KEYWORD_FINAL: uint = 71;
527508

528509
// if an interner exists in TLS, return it. Otherwise, prepare a

branches/auto/src/snapshots.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
S 2013-10-07 c919629
2+
freebsd-x86_64 c9af0c52bdcc1ffe2db4c9a3a1aaae66ff7fcc2c
3+
linux-i386 0245cb9e57c9b39f3441e9768256783ba76be6e7
4+
linux-x86_64 483d9bd109316e647a11d387653568d95e3581e6
5+
macos-i386 c12154816a8f5cd7b2c758250859cf6abf3eddbf
6+
macos-x86_64 9d46c31618a3bbd6ddffa598f1350e16c620621b
7+
winnt-i386 b111d291a15ff7f02aba9c59bb81ae7a3cd86628
8+
19
S 2013-10-04 8bb55db
210
freebsd-x86_64 8b68b99033e68f5d98e3e3d077de9d2e085be1ba
311
linux-i386 10bc0069efdca378155640963d70d3a08a7248dc

branches/auto/src/test/compile-fail/issue-2354-1.rs

Lines changed: 0 additions & 12 deletions
This file was deleted.

branches/auto/src/test/compile-fail/issue-2354.rs

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

11-
fn foo() { //~ NOTE Did you mean to close this delimiter?
11+
// xfail-test
12+
/*
13+
Ideally, the error about the missing close brace in foo would be reported
14+
near the corresponding open brace. But currently it's reported at the end.
15+
xfailed for now (see Issue #2354)
16+
*/
17+
fn foo() { //~ ERROR this open brace is not closed
1218
match Some(x) {
1319
Some(y) { fail!(); }
1420
None { fail!(); }
@@ -19,4 +25,4 @@ fn bar() {
1925
while (i < 1000) {}
2026
}
2127

22-
fn main() {} //~ ERROR This file contains an un-closed delimiter
28+
fn main() {}

0 commit comments

Comments
 (0)