diff options
| author | bors <bors@rust-lang.org> | 2022-08-11 21:30:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-08-11 21:30:07 +0000 |
| commit | 2ed0f29168f5bc116e747152be600519b5d78bfd (patch) | |
| tree | c90db3ddda1c65dc26527c7d60fc06f6f94040d2 /compiler/rustc_parse/src/parser | |
| parent | 20ffea6938b5839c390252e07940b99e3b6a889a (diff) | |
| parent | c7578b4e65df9ede839fe94063e09961b82e6ade (diff) | |
| download | rust-2ed0f29168f5bc116e747152be600519b5d78bfd.tar.gz rust-2ed0f29168f5bc116e747152be600519b5d78bfd.zip | |
Auto merge of #100426 - matthiaskrgr:rollup-0ks4dou, r=matthiaskrgr
Rollup of 13 pull requests Successful merges: - #93896 (rustdoc: make item-infos dimmer on dark theme) - #99337 (rustdoc: simplify highlight.rs) - #99421 (add crt-static for android) - #99500 (Fix flags when using clang as linker for Fuchsia) - #99511 (make raw_eq precondition more restrictive) - #99992 (Add `x.sh` and `x.ps1` shell scripts) - #100112 (Fix test: chunks_mut_are_send_and_sync) - #100203 (provide correct size hint for unsupported platform `CommandArgs`) - #100307 (Fix #96847) - #100350 (Stringify non-shorthand visibility correctly) - #100374 (Improve crate selection on rustdoc search results page) - #100392 (Simplify visitors) - #100418 (Add stability attributes to BacktraceStatus variants) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index 0c523ad22c2..c088b6e1e0e 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -1295,7 +1295,11 @@ impl<'a> Parser<'a> { self.bump(); // `in` let path = self.parse_path(PathStyle::Mod)?; // `path` self.expect(&token::CloseDelim(Delimiter::Parenthesis))?; // `)` - let vis = VisibilityKind::Restricted { path: P(path), id: ast::DUMMY_NODE_ID }; + let vis = VisibilityKind::Restricted { + path: P(path), + id: ast::DUMMY_NODE_ID, + shorthand: false, + }; return Ok(Visibility { span: lo.to(self.prev_token.span), kind: vis, @@ -1308,7 +1312,11 @@ impl<'a> Parser<'a> { self.bump(); // `(` let path = self.parse_path(PathStyle::Mod)?; // `crate`/`super`/`self` self.expect(&token::CloseDelim(Delimiter::Parenthesis))?; // `)` - let vis = VisibilityKind::Restricted { path: P(path), id: ast::DUMMY_NODE_ID }; + let vis = VisibilityKind::Restricted { + path: P(path), + id: ast::DUMMY_NODE_ID, + shorthand: true, + }; return Ok(Visibility { span: lo.to(self.prev_token.span), kind: vis, |
