diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-11-29 04:23:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-29 04:23:24 +0100 |
| commit | 8cfdccf7c87f2d87a72f0b60ea2d16218ca27fb8 (patch) | |
| tree | 866c2abaacd8cdea6a9f2001490c45230311d8f1 /tests/rustdoc-js-std/primitive.js | |
| parent | b7016ae20591cbe2da3f4b747d69714dd690c158 (diff) | |
| parent | dd5abb50cc08a212d23be1fb8482ae166e9bc738 (diff) | |
| download | rust-8cfdccf7c87f2d87a72f0b60ea2d16218ca27fb8.tar.gz rust-8cfdccf7c87f2d87a72f0b60ea2d16218ca27fb8.zip | |
Rollup merge of #118419 - compiler-errors:await-span2, r=cjgillot
Eagerly return `ExprKind::Err` on `yield`/`await` in wrong coroutine context This PR does 2 things: 1. Refuses to lower `.await` or `yield` when we are outside of the right coroutine context for the operator. Instead, we lower to `hir::ExprKind::Err`, to silence subsequent redundant errors. 2. Reworks a bit of the span tracking in `LoweringContext` to fix a bad span when we have something like `let x = [0; async_fn().await]` where the `await` is inside of an anon const. The span for the "item" still kinda sucks, since it overlaps with the `await` span, but at least it's accurate.
Diffstat (limited to 'tests/rustdoc-js-std/primitive.js')
0 files changed, 0 insertions, 0 deletions
