mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
always return ExprKind::Err
This commit is contained in:
parent
9ed5267e61
commit
13ac0234c6
@ -1717,12 +1717,7 @@ impl<'a> Parser<'a> {
|
||||
self.recover_await_prefix(await_sp)?
|
||||
};
|
||||
let sp = self.error_on_incorrect_await(lo, hi, &expr, is_question);
|
||||
let kind = match expr.kind {
|
||||
// Avoid knock-down errors as we don't know whether to interpret this as `foo().await?`
|
||||
// or `foo()?.await` (the very reason we went with postfix syntax 😅).
|
||||
ExprKind::Try(_) => ExprKind::Err,
|
||||
_ => ExprKind::Await(expr, await_sp),
|
||||
};
|
||||
let kind = ExprKind::Err;
|
||||
let expr = self.mk_expr(lo.to(sp), kind);
|
||||
self.maybe_recover_from_bad_qpath(expr)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user