about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-08-12 17:51:16 +0000
committerbors <bors@rust-lang.org>2023-08-12 17:51:16 +0000
commitcbb48a5e930fe4e8432ec318299731c8298e2910 (patch)
tree44ee50062e5ecf8d3705980ecdaceee4c83f49f2 /compiler/rustc_parse/src
parent1e836d12d39ea09b1d86ebda70cb11b41564cead (diff)
parentcf9081c0a1a7132854f9fe36b09c1a2752d787f2 (diff)
downloadrust-cbb48a5e930fe4e8432ec318299731c8298e2910.tar.gz
rust-cbb48a5e930fe4e8432ec318299731c8298e2910.zip
Auto merge of #114756 - matthiaskrgr:rollup-4m7l4p6, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #94455 (Partially stabilize `int_roundings`)
 - #114132 (Better Debug for Vars and VarsOs)
 - #114584 (E0277 nolonger points at phantom `.await`)
 - #114667 (Record binder for bare trait object in LifetimeCollectVisitor)
 - #114692 (downgrade `internal_features` to warn)
 - #114703 (Cover ParamConst in smir)
 - #114734 (Mark oli as "on vacation")

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src')
-rw-r--r--compiler/rustc_parse/src/parser/diagnostics.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs
index 4e639a54cf7..6c8ef34063f 100644
--- a/compiler/rustc_parse/src/parser/diagnostics.rs
+++ b/compiler/rustc_parse/src/parser/diagnostics.rs
@@ -1717,13 +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 expr = self.mk_expr(lo.to(sp), kind);
+        let expr = self.mk_expr(lo.to(sp), ExprKind::Err);
         self.maybe_recover_from_bad_qpath(expr)
     }