diff options
| author | Alan Somers <asomers@gmail.com> | 2016-04-06 02:22:18 +0000 |
|---|---|---|
| committer | Alan Somers <asomers@gmail.com> | 2016-04-06 02:22:18 +0000 |
| commit | 1e9ffb899195291c6682c244f2d485b6121a7dc4 (patch) | |
| tree | 39f12484dfe0fb508929497ba163824cdc1f9518 /src/libsyntax/parse | |
| parent | 112463a3b1b1fc30c8f407e50e9ef692034ccb37 (diff) | |
| parent | 241a9d0ddf99fd40d273c615e9b1e8ce6052d94a (diff) | |
| download | rust-1e9ffb899195291c6682c244f2d485b6121a7dc4.tar.gz rust-1e9ffb899195291c6682c244f2d485b6121a7dc4.zip | |
Merge github.com:rust-lang/rust
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 10 | ||||
| -rw-r--r-- | src/libsyntax/parse/token.rs | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 9027a5b1074..75916b87c12 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -6124,7 +6124,7 @@ impl<'a> Parser<'a> { // Allow a leading :: because the paths are absolute either way. // This occurs with "use $crate::..." in macros. - self.eat(&token::ModSep); + let is_global = self.eat(&token::ModSep); if self.check(&token::OpenDelim(token::Brace)) { // use {foo,bar} @@ -6135,7 +6135,7 @@ impl<'a> Parser<'a> { |p| p.parse_path_list_item())?; let path = ast::Path { span: mk_sp(lo, self.span.hi), - global: false, + global: is_global, segments: Vec::new() }; return Ok(P(spanned(lo, self.span.hi, ViewPathList(path, idents)))); @@ -6164,7 +6164,7 @@ impl<'a> Parser<'a> { )?; let path = ast::Path { span: mk_sp(lo, self.span.hi), - global: false, + global: is_global, segments: path.into_iter().map(|identifier| { ast::PathSegment { identifier: identifier, @@ -6180,7 +6180,7 @@ impl<'a> Parser<'a> { self.bump(); let path = ast::Path { span: mk_sp(lo, self.span.hi), - global: false, + global: is_global, segments: path.into_iter().map(|identifier| { ast::PathSegment { identifier: identifier, @@ -6203,7 +6203,7 @@ impl<'a> Parser<'a> { let mut rename_to = path[path.len() - 1]; let path = ast::Path { span: mk_sp(lo, self.last_span.hi), - global: false, + global: is_global, segments: path.into_iter().map(|identifier| { ast::PathSegment { identifier: identifier, diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index a02a10aa003..16417ac0044 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -514,7 +514,7 @@ macro_rules! declare_special_idents_and_keywords {( // If the special idents get renumbered, remember to modify these two as appropriate pub const SELF_KEYWORD_NAME: ast::Name = ast::Name(SELF_KEYWORD_NAME_NUM); const STATIC_KEYWORD_NAME: ast::Name = ast::Name(STATIC_KEYWORD_NAME_NUM); -const SUPER_KEYWORD_NAME: ast::Name = ast::Name(SUPER_KEYWORD_NAME_NUM); +pub const SUPER_KEYWORD_NAME: ast::Name = ast::Name(SUPER_KEYWORD_NAME_NUM); const SELF_TYPE_KEYWORD_NAME: ast::Name = ast::Name(SELF_TYPE_KEYWORD_NAME_NUM); pub const SELF_KEYWORD_NAME_NUM: u32 = 1; |
