Files
rust/tests/ui
Matthias Krüger 8cfdccf7c8 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.
2023-11-29 04:23:24 +01:00
..
2023-05-30 13:03:40 +02:00
2023-11-24 21:04:51 +01:00
2023-09-06 12:09:29 +03:00
2023-11-24 21:04:51 +01:00
2023-11-24 21:04:51 +01:00
2023-11-24 21:04:51 +01:00
2023-11-24 21:04:51 +01:00
2023-11-24 21:04:51 +01:00
2023-11-24 21:04:51 +01:00
2023-11-25 23:58:52 +00:00
2023-07-29 11:47:26 +02:00
2023-11-24 21:04:51 +01:00
2023-10-28 23:11:03 -07:00
2023-11-24 14:32:05 +00:00
2023-08-14 16:57:51 -07:00
2023-09-18 17:29:13 +01:00
2023-10-20 21:14:01 +00:00
2023-04-29 13:01:46 +01:00
2023-09-10 23:06:14 +02:00
2023-09-10 23:06:14 +02:00
2023-10-20 21:14:01 +00:00