]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_parse/src/parser/expr.rs
Rollup merge of #107608 - P1n3appl3:master, r=tmandry
[rust.git] / compiler / rustc_parse / src / parser / expr.rs
index b7a023868fced9e84107b4194816a3db53bede7f..3d42a9dcbbea1916b3c6d3e66e408d2fc1eff1e9 100644 (file)
@@ -2717,6 +2717,14 @@ fn check_let_expr(expr: &Expr) -> (bool, bool) {
                     );
                     err.emit();
                     this.bump();
+                } else if matches!(
+                    (&this.prev_token.kind, &this.token.kind),
+                    (token::DotDotEq, token::Gt)
+                ) {
+                    // `error_inclusive_range_match_arrow` handles cases like `0..=> {}`,
+                    // so we supress the error here
+                    err.delay_as_bug();
+                    this.bump();
                 } else {
                     return Err(err);
                 }