diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2025-08-22 22:00:47 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-22 22:00:47 -0400 |
| commit | 2dbd411d229ee382b1cf2ec3af84cd581d56d521 (patch) | |
| tree | 6b1323a95a2e0d5e1cf13638ca3ed674906e25fb /compiler/rustc_parse/src/parser/ty.rs | |
| parent | 2bd39222cdb9b6bb182c4de44cde99048942683b (diff) | |
| parent | 4970127c33a2cfd7b7035daedba7cac512a2e201 (diff) | |
| download | rust-2dbd411d229ee382b1cf2ec3af84cd581d56d521.tar.gz rust-2dbd411d229ee382b1cf2ec3af84cd581d56d521.zip | |
Rollup merge of #144897 - fee1-dead-contrib:raw_lifetimes_printing, r=fmease
print raw lifetime idents with r# This replaces rust-lang/rust#143185 and fixes rust-lang/rust#143150 cc ``@fmease``
Diffstat (limited to 'compiler/rustc_parse/src/parser/ty.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/ty.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/ty.rs b/compiler/rustc_parse/src/parser/ty.rs index 94f381ee051..6168647183f 100644 --- a/compiler/rustc_parse/src/parser/ty.rs +++ b/compiler/rustc_parse/src/parser/ty.rs @@ -1502,8 +1502,7 @@ impl<'a> Parser<'a> { pub(super) fn expect_lifetime(&mut self) -> Lifetime { if let Some((ident, is_raw)) = self.token.lifetime() { if matches!(is_raw, IdentIsRaw::No) - && ident.without_first_quote().is_reserved() - && ![kw::UnderscoreLifetime, kw::StaticLifetime].contains(&ident.name) + && ident.without_first_quote().is_reserved_lifetime() { self.dcx().emit_err(errors::KeywordLifetime { span: ident.span }); } |
