1
Fork 0

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
This commit is contained in:
Matthias Krüger 2024-09-07 23:30:10 +02:00 committed by GitHub
commit ccf3f6e59d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
40 changed files with 373 additions and 85 deletions

View file

@ -708,6 +708,10 @@ lint_range_endpoint_out_of_range = range endpoint is out of range for `{$ty}`
lint_range_use_inclusive_range = use an inclusive range instead
lint_raw_prefix = prefix `'r` is reserved
.label = reserved prefix
.suggestion = insert whitespace here to avoid this being parsed as a prefix in Rust 2021
lint_reason_must_be_string_literal = reason must be a string literal
lint_reason_must_come_last = reason in lint attribute must come last