diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-04-17 05:44:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-17 05:44:52 +0200 |
| commit | 45940fe6d8744cfd110476489c40b8baef901c0a (patch) | |
| tree | 1bac7f60c63e541f06ce3e0b9ac607345edf5dfb /compiler/rustc_parse/src/parser | |
| parent | 7e3ba5b8b7556073ab69822cc36b93d6e74cd8c9 (diff) | |
| parent | b03ae74c84977517639449e35473fcedd6409ab3 (diff) | |
| download | rust-45940fe6d8744cfd110476489c40b8baef901c0a.tar.gz rust-45940fe6d8744cfd110476489c40b8baef901c0a.zip | |
Rollup merge of #122813 - nnethercote:nicer-quals, r=compiler-errors
Qualifier tweaking Adding and removing qualifiers in some cases that make things nicer. Details in individual commits. r? `@compiler-errors`
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/item.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index b711ee9a8ee..446b56a63c6 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -1968,11 +1968,8 @@ impl<'a> Parser<'a> { } else if matches!(is_raw, IdentIsRaw::No) && ident.is_reserved() { let snapshot = self.create_snapshot_for_diagnostic(); let err = if self.check_fn_front_matter(false, Case::Sensitive) { - let inherited_vis = Visibility { - span: rustc_span::DUMMY_SP, - kind: VisibilityKind::Inherited, - tokens: None, - }; + let inherited_vis = + Visibility { span: DUMMY_SP, kind: VisibilityKind::Inherited, tokens: None }; // We use `parse_fn` to get a span for the function let fn_parse_mode = FnParseMode { req_name: |_| true, req_body: true }; match self.parse_fn( |
