diff options
| author | Lieselotte <52315535+she3py@users.noreply.github.com> | 2024-01-28 16:12:21 +0100 |
|---|---|---|
| committer | Lieselotte <52315535+she3py@users.noreply.github.com> | 2024-01-28 16:12:21 +0100 |
| commit | 6f014a81b2466c2abdae4c06ff81fae7e1bc006c (patch) | |
| tree | 338c16a2576e619cc2d21a902423541a0d30b88a /compiler/rustc_parse/src/errors.rs | |
| parent | 635124704849eeead4e3a7bb6e663c5351571d93 (diff) | |
| download | rust-6f014a81b2466c2abdae4c06ff81fae7e1bc006c.tar.gz rust-6f014a81b2466c2abdae4c06ff81fae7e1bc006c.zip | |
Handle methodcalls & operators in patterns
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 40852048293..fa91b64d531 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -2416,6 +2416,18 @@ pub(crate) struct ExpectedCommaAfterPatternField { } #[derive(Diagnostic)] +#[diag(parse_unexpected_expr_in_pat)] +pub(crate) struct UnexpectedExpressionInPattern { + #[primary_span] + #[label] + pub span: Span, + /// Was a `RangePatternBound` expected? + pub is_bound: bool, + /// Was the unexpected expression a `MethodCallExpression`? + pub is_method_call: bool, +} + +#[derive(Diagnostic)] #[diag(parse_unexpected_paren_in_range_pat)] pub(crate) struct UnexpectedParenInRangePat { #[primary_span] |
