Skip to content

Commit 01a70c6

Browse files
committed
Add a closing parenthesis to the span of Visibility::Crate
1 parent b298607 commit 01a70c6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5702,8 +5702,8 @@ impl<'a> Parser<'a> {
57025702
// `pub(crate)`
57035703
self.bump(); // `(`
57045704
self.bump(); // `crate`
5705-
let vis = Visibility::Crate(self.prev_span, CrateSugar::PubCrate);
57065705
self.expect(&token::CloseDelim(token::Paren))?; // `)`
5706+
let vis = Visibility::Crate(self.prev_span, CrateSugar::PubCrate);
57075707
return Ok(vis)
57085708
} else if self.look_ahead(1, |t| t.is_keyword(keywords::In)) {
57095709
// `pub(in path)`
@@ -5715,7 +5715,8 @@ impl<'a> Parser<'a> {
57155715
return Ok(vis)
57165716
} else if self.look_ahead(2, |t| t == &token::CloseDelim(token::Paren)) &&
57175717
self.look_ahead(1, |t| t.is_keyword(keywords::Super) ||
5718-
t.is_keyword(keywords::SelfValue)) {
5718+
t.is_keyword(keywords::SelfValue))
5719+
{
57195720
// `pub(self)` or `pub(super)`
57205721
self.bump(); // `(`
57215722
let path = self.parse_path(PathStyle::Mod)?.default_to_global(); // `super`/`self`

0 commit comments

Comments
 (0)