diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-12-29 16:36:32 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-12-29 16:36:32 -0800 |
| commit | 066be2a72d22d8512aea3d8a4d7601a64d6e7ad4 (patch) | |
| tree | ddeb44849e7de1c1bc0572e9f4e501e2b2d1d72a /src/libsyntax/parse/parser.rs | |
| parent | b1dec37561972c3e9e4026a8339722ebbef7384f (diff) | |
| parent | 4c4eabfd6c7e39e2b01851af2e58d38d898aac39 (diff) | |
| download | rust-066be2a72d22d8512aea3d8a4d7601a64d6e7ad4.tar.gz rust-066be2a72d22d8512aea3d8a4d7601a64d6e7ad4.zip | |
rollup merge of #20266: nick29581/dxr-use
r? @huonw
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index fd64511cc04..e88aabb044c 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -5977,7 +5977,7 @@ impl<'a> Parser<'a> { } - /// Matches view_path : MOD? IDENT EQ non_global_path + /// Matches view_path : MOD? non_global_path as IDENT /// | MOD? non_global_path MOD_SEP LBRACE RBRACE /// | MOD? non_global_path MOD_SEP LBRACE ident_seq RBRACE /// | MOD? non_global_path MOD_SEP STAR @@ -6089,7 +6089,7 @@ impl<'a> Parser<'a> { } let mut rename_to = path[path.len() - 1u]; let path = ast::Path { - span: mk_sp(lo, self.span.hi), + span: mk_sp(lo, self.last_span.hi), global: false, segments: path.into_iter().map(|identifier| { ast::PathSegment { @@ -6101,7 +6101,8 @@ impl<'a> Parser<'a> { if self.eat_keyword(keywords::As) { rename_to = self.parse_ident() } - P(spanned(lo, self.last_span.hi, + P(spanned(lo, + self.last_span.hi, ViewPathSimple(rename_to, path, ast::DUMMY_NODE_ID))) } |
