diff options
| author | Seiichi Uchida <seuchida@gmail.com> | 2018-01-27 16:13:50 +0900 |
|---|---|---|
| committer | Seiichi Uchida <seuchida@gmail.com> | 2018-02-18 00:10:40 +0900 |
| commit | 01a70c65892eea8cdf9d6a5f72ea003897eb61c6 (patch) | |
| tree | bda7f0c5de148d7f684dd737a5be1a99a019f1bf /src/libsyntax/parse/parser.rs | |
| parent | b298607864b76ea6b7b7a4b8bb482472f1604c8d (diff) | |
| download | rust-01a70c65892eea8cdf9d6a5f72ea003897eb61c6.tar.gz rust-01a70c65892eea8cdf9d6a5f72ea003897eb61c6.zip | |
Add a closing parenthesis to the span of Visibility::Crate
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index ac582627f88..effc5f75f6a 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -5702,8 +5702,8 @@ impl<'a> Parser<'a> { // `pub(crate)` self.bump(); // `(` self.bump(); // `crate` - let vis = Visibility::Crate(self.prev_span, CrateSugar::PubCrate); self.expect(&token::CloseDelim(token::Paren))?; // `)` + let vis = Visibility::Crate(self.prev_span, CrateSugar::PubCrate); return Ok(vis) } else if self.look_ahead(1, |t| t.is_keyword(keywords::In)) { // `pub(in path)` @@ -5715,7 +5715,8 @@ impl<'a> Parser<'a> { return Ok(vis) } else if self.look_ahead(2, |t| t == &token::CloseDelim(token::Paren)) && self.look_ahead(1, |t| t.is_keyword(keywords::Super) || - t.is_keyword(keywords::SelfValue)) { + t.is_keyword(keywords::SelfValue)) + { // `pub(self)` or `pub(super)` self.bump(); // `(` let path = self.parse_path(PathStyle::Mod)?.default_to_global(); // `super`/`self` |
