diff options
| author | Takayuki Maeda <takoyaki0316@gmail.com> | 2023-11-14 00:54:16 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-14 00:54:16 +0900 |
| commit | cf21b6ef28fc2e7edbaa23237d02b4c585c44da8 (patch) | |
| tree | 989308cf4b0803573d3d09b061c6d731bb465a00 /compiler/rustc_ast_lowering | |
| parent | 826b181cefc5c12d090cb6cec7d2241c620176f8 (diff) | |
| parent | 7994b5849ca583cdbbcb55e71e1152ada7a6c077 (diff) | |
| download | rust-cf21b6ef28fc2e7edbaa23237d02b4c585c44da8.tar.gz rust-cf21b6ef28fc2e7edbaa23237d02b4c585c44da8.zip | |
Rollup merge of #117858 - compiler-errors:span, r=lcnr
Compute layout with spans for better cycle errors in coroutines Split out from #117703, this PR at least gives us a nicer span to point at when we hit a cycle error in coroutine layout cycles.
Diffstat (limited to 'compiler/rustc_ast_lowering')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/expr.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_ast_lowering/src/expr.rs b/compiler/rustc_ast_lowering/src/expr.rs index 0fff9a6be92..c07dbbc9d67 100644 --- a/compiler/rustc_ast_lowering/src/expr.rs +++ b/compiler/rustc_ast_lowering/src/expr.rs @@ -792,8 +792,11 @@ impl<'hir> LoweringContext<'_, 'hir> { // debuggers and debugger extensions expect it to be called `__awaitee`. They use // this name to identify what is being awaited by a suspended async functions. let awaitee_ident = Ident::with_dummy_span(sym::__awaitee); - let (awaitee_pat, awaitee_pat_hid) = - self.pat_ident_binding_mode(span, awaitee_ident, hir::BindingAnnotation::MUT); + let (awaitee_pat, awaitee_pat_hid) = self.pat_ident_binding_mode( + gen_future_span, + awaitee_ident, + hir::BindingAnnotation::MUT, + ); let task_context_ident = Ident::with_dummy_span(sym::_task_context); |
