diff options
| author | yukang <moorekang@gmail.com> | 2022-11-12 04:22:47 +0800 |
|---|---|---|
| committer | yukang <moorekang@gmail.com> | 2022-11-15 08:58:19 +0800 |
| commit | 9db8e183dc17896ce5f307f6de19c261d746a9bc (patch) | |
| tree | b3c6e8b4903ff4d7d55a3d3721e259c97f39921d /compiler/rustc_parse/src/errors.rs | |
| parent | 101e1822c3e54e63996c8aaa014d55716f3937eb (diff) | |
| download | rust-9db8e183dc17896ce5f307f6de19c261d746a9bc.tar.gz rust-9db8e183dc17896ce5f307f6de19c261d746a9bc.zip | |
fix #104088, Slightly improve error message for invalid identifier
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index a39398950a5..2b17cea9794 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -1206,6 +1206,14 @@ pub(crate) struct SelfParamNotFirst { } #[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 { #[primary_span] |
