diff options
| author | bors <bors@rust-lang.org> | 2023-02-05 20:33:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-02-05 20:33:05 +0000 |
| commit | 75a0be98f25a4b9de5afa0e15eb016e7f9627032 (patch) | |
| tree | 7f417a69f7d64017ffabc3291f6d8adafbdad700 /compiler/rustc_parse/src/errors.rs | |
| parent | a67649675014546ce454d65bc8fe3ebd18e6a319 (diff) | |
| parent | 17b6bd6b70fd49c034b32b5b9b2869d139ed4d46 (diff) | |
| download | rust-75a0be98f25a4b9de5afa0e15eb016e7f9627032.tar.gz rust-75a0be98f25a4b9de5afa0e15eb016e7f9627032.zip | |
Auto merge of #107526 - obeis:for-missing-iterator, r=estebank,compiler-errors
Recover form missing expression in `for` loop Close #78537 r? `@estebank`
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index fd4333dbbec..fc7c839f1c4 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -434,6 +434,18 @@ pub(crate) enum MissingInInForLoopSub { } #[derive(Diagnostic)] +#[diag(parse_missing_expression_in_for_loop)] +pub(crate) struct MissingExpressionInForLoop { + #[primary_span] + #[suggestion( + code = "/* expression */ ", + applicability = "has-placeholders", + style = "verbose" + )] + pub span: Span, +} + +#[derive(Diagnostic)] #[diag(parse_missing_comma_after_match_arm)] pub(crate) struct MissingCommaAfterMatchArm { #[primary_span] |
