File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -792,8 +792,11 @@ impl<'hir> LoweringContext<'_, 'hir> {
792792 // debuggers and debugger extensions expect it to be called `__awaitee`. They use
793793 // this name to identify what is being awaited by a suspended async functions.
794794 let awaitee_ident = Ident :: with_dummy_span ( sym:: __awaitee) ;
795- let ( awaitee_pat, awaitee_pat_hid) =
796- self . pat_ident_binding_mode ( span, awaitee_ident, hir:: BindingAnnotation :: MUT ) ;
795+ let ( awaitee_pat, awaitee_pat_hid) = self . pat_ident_binding_mode (
796+ gen_future_span,
797+ awaitee_ident,
798+ hir:: BindingAnnotation :: MUT ,
799+ ) ;
797800
798801 let task_context_ident = Ident :: with_dummy_span ( sym:: _task_context) ;
799802
Original file line number Diff line number Diff line change @@ -740,11 +740,11 @@ fn coroutine_layout<'tcx>(
740740 } ;
741741 let tag_layout = cx. tcx . mk_layout ( LayoutS :: scalar ( cx, tag) ) ;
742742
743- let promoted_layouts = ineligible_locals
744- . iter ( )
745- . map ( |local| subst_field ( info . field_tys [ local ] . ty ) )
746- . map ( |ty| Ty :: new_maybe_uninit ( tcx , ty ) )
747- . map ( |ty| Ok ( cx . layout_of ( ty ) ? . layout ) ) ;
743+ let promoted_layouts = ineligible_locals. iter ( ) . map ( |local| {
744+ let field_ty = subst_field ( info . field_tys [ local ] . ty ) ;
745+ let uninit_ty = Ty :: new_maybe_uninit ( tcx , field_ty ) ;
746+ Ok ( cx . spanned_layout_of ( uninit_ty , info . field_tys [ local ] . source_info . span ) ? . layout )
747+ } ) ;
748748 let prefix_layouts = args
749749 . as_coroutine ( )
750750 . prefix_tys ( )
You can’t perform that action at this time.
0 commit comments