]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_parse/src/errors.rs
Rollup merge of #104137 - StackDoubleFlow:err-lsc-unsupported, r=bjorn3
[rust.git] / compiler / rustc_parse / src / errors.rs
index 69fe805e9cdec958418e373c0c27edd8dd7fc399..2b17cea97949a2cdfd1cecfcd17a56af5387dea6 100644 (file)
@@ -1165,10 +1165,12 @@ pub(crate) struct ParenthesesInForHead {
 #[derive(Subdiagnostic)]
 #[multipart_suggestion(suggestion, applicability = "machine-applicable")]
 pub(crate) struct ParenthesesInForHeadSugg {
-    #[suggestion_part(code = "")]
+    #[suggestion_part(code = "{left_snippet}")]
     pub left: Span,
-    #[suggestion_part(code = "")]
+    pub left_snippet: String,
+    #[suggestion_part(code = "{right_snippet}")]
     pub right: Span,
+    pub right_snippet: String,
 }
 
 #[derive(Diagnostic)]
@@ -1203,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 {