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> {
792
792
// debuggers and debugger extensions expect it to be called `__awaitee`. They use
793
793
// this name to identify what is being awaited by a suspended async functions.
794
794
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
+ ) ;
797
800
798
801
let task_context_ident = Ident :: with_dummy_span ( sym:: _task_context) ;
799
802
Original file line number Diff line number Diff line change @@ -740,11 +740,11 @@ fn coroutine_layout<'tcx>(
740
740
} ;
741
741
let tag_layout = cx. tcx . mk_layout ( LayoutS :: scalar ( cx, tag) ) ;
742
742
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
+ } ) ;
748
748
let prefix_layouts = args
749
749
. as_coroutine ( )
750
750
. prefix_tys ( )
You can’t perform that action at this time.
0 commit comments