Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse & reject postfix operators after casts #68985

Merged
merged 12 commits into from
Mar 7, 2020
3 changes: 1 addition & 2 deletions src/librustc_parse/parser/expr.rs
Original file line number Diff line number Diff line change
@@ -659,8 +659,7 @@ impl<'a> Parser<'a> {
ExprKind::MethodCall(_, _) => "a method call",
ExprKind::Call(_, _) => "a function call",
ExprKind::Await(_) => "`.await`",
ref kind =>
unreachable!("parse_dot_or_call_expr_with_ shouldn't produce a {:?}", kind),
_ => unreachable!("parse_dot_or_call_expr_with_ shouldn't produce this"),
}
);
let mut err = self.struct_span_err(span, &msg);