about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/errors.rs
diff options
context:
space:
mode:
authoryukang <moorekang@gmail.com>2022-10-13 23:27:17 +0800
committeryukang <moorekang@gmail.com>2022-11-04 10:35:36 +0800
commit1e25882944aabcf0c871182b887cd4ffe9c7b330 (patch)
tree2bef772d7d5d88173b8eddedca32592753431a6e /compiler/rustc_parse/src/errors.rs
parent6718ea1cff98da785c10079cac1c1ecc30c12d52 (diff)
downloadrust-1e25882944aabcf0c871182b887cd4ffe9c7b330.tar.gz
rust-1e25882944aabcf0c871182b887cd4ffe9c7b330.zip
fix #102806, suggest use .. to fill in the rest of the fields of Struct
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
-rw-r--r--compiler/rustc_parse/src/errors.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs
index dc204902842..b02bd664533 100644
--- a/compiler/rustc_parse/src/errors.rs
+++ b/compiler/rustc_parse/src/errors.rs
@@ -369,6 +369,15 @@ pub(crate) struct MissingSemicolonBeforeArray {
 }
 
 #[derive(Diagnostic)]
+#[diag(parser_expect_dotdot_not_dotdotdot)]
+pub(crate) struct MissingDotDot {
+    #[primary_span]
+    pub token_span: Span,
+    #[suggestion_verbose(applicability = "maybe-incorrect", code = "..")]
+    pub sugg_span: Span,
+}
+
+#[derive(Diagnostic)]
 #[diag(parser_invalid_block_macro_segment)]
 pub(crate) struct InvalidBlockMacroSegment {
     #[primary_span]