Enforce that raw lifetime identifiers must be valid raw identifiers

This commit is contained in:
Michael Goulet 2024-10-30 14:45:17 +00:00
parent 1e4f10ba64
commit 9785c7cf94
5 changed files with 72 additions and 4 deletions

View file

@ -2018,6 +2018,14 @@ pub(crate) struct CannotBeRawIdent {
pub ident: Symbol,
}
#[derive(Diagnostic)]
#[diag(parse_cannot_be_raw_lifetime)]
pub(crate) struct CannotBeRawLifetime {
#[primary_span]
pub span: Span,
pub ident: Symbol,
}
#[derive(Diagnostic)]
#[diag(parse_keyword_lifetime)]
pub(crate) struct KeywordLifetime {