fix #104088, Slightly improve error message for invalid identifier

This commit is contained in:
yukang 2022-11-12 04:22:47 +08:00
parent 101e1822c3
commit 9db8e183dc
5 changed files with 81 additions and 2 deletions

View file

@ -1205,6 +1205,14 @@ pub(crate) struct SelfParamNotFirst {
pub span: Span,
}
#[derive(Diagnostic)]
#[diag(parser_invalid_identifier_with_leading_number)]
pub(crate) struct InvalidIdentiferStartsWithNumber {
#[primary_span]
#[label]
pub span: Span,
}
#[derive(Diagnostic)]
#[diag(parser_const_generic_without_braces)]
pub(crate) struct ConstGenericWithoutBraces {