diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-09-07 23:30:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-07 23:30:10 +0200 |
| commit | ccf3f6e59d554c84ad654d04f03bc781497a743c (patch) | |
| tree | 15c7e56db5931f9ae24cfec6f1939521eb11a49b /compiler/rustc_lint/src/context | |
| parent | ec867f03bcd6c39156ef13eb5f85bf4fb924ca29 (diff) | |
| parent | b6a86bee87a8f54e132bb276fadc738c1afc1ef6 (diff) | |
| download | rust-ccf3f6e59d554c84ad654d04f03bc781497a743c.tar.gz rust-ccf3f6e59d554c84ad654d04f03bc781497a743c.zip | |
Rollup merge of #126452 - compiler-errors:raw-lifetimes, r=spastorino
Implement raw lifetimes and labels (`'r#ident`) This PR does two things: 1. Reserve lifetime prefixes, e.g. `'prefix#lt` in edition 2021. 2. Implements raw lifetimes, e.g. `'r#async` in edition 2021. This PR additionally extends the `keyword_idents_2024` lint to also check lifetimes. cc `@traviscross` r? parser
Diffstat (limited to 'compiler/rustc_lint/src/context')
| -rw-r--r-- | compiler/rustc_lint/src/context/diagnostics.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/context/diagnostics.rs b/compiler/rustc_lint/src/context/diagnostics.rs index de34b9bebe9..fd13c418c09 100644 --- a/compiler/rustc_lint/src/context/diagnostics.rs +++ b/compiler/rustc_lint/src/context/diagnostics.rs @@ -172,6 +172,10 @@ pub(super) fn decorate_lint(sess: &Session, diagnostic: BuiltinLintDiag, diag: & } .decorate_lint(diag); } + BuiltinLintDiag::RawPrefix(label_span) => { + lints::RawPrefix { label: label_span, suggestion: label_span.shrink_to_hi() } + .decorate_lint(diag); + } BuiltinLintDiag::UnusedBuiltinAttribute { attr_name, macro_name, invoc_span } => { lints::UnusedBuiltinAttribute { invoc_span, attr_name, macro_name }.decorate_lint(diag); } |
