about summary refs log tree commit diff
path: root/src/librustc_parse/parser
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2020-03-30 09:20:55 +0200
committerMazdak Farrokhzad <twingoow@gmail.com>2020-03-30 09:55:57 +0200
commit96d73536782fb4a6a4b98db330ac5446c63a8005 (patch)
tree38b3c6581bd2a4eb8a043518a4c6211e97b245f6 /src/librustc_parse/parser
parent0afdf43dc1d9be4c8b422840166b51dd99e56a16 (diff)
parse_and_disallow_postfix_after_cast: account for `ExprKind::Err`.
Diffstat (limited to 'src/librustc_parse/parser')
-rw-r--r--src/librustc_parse/parser/expr.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustc_parse/parser/expr.rs b/src/librustc_parse/parser/expr.rs
index b205a4b3222..cbff99f8da6 100644
--- a/src/librustc_parse/parser/expr.rs
+++ b/src/librustc_parse/parser/expr.rs
@@ -638,6 +638,7 @@ impl<'a> Parser<'a> {
                     ExprKind::MethodCall(_, _) => "a method call",
                     ExprKind::Call(_, _) => "a function call",
                     ExprKind::Await(_) => "`.await`",
+                    ExprKind::Err => return Ok(with_postfix),
                     _ => unreachable!("parse_dot_or_call_expr_with_ shouldn't produce this"),
                 }
             );