diff options
| author | Shoyu Vanilla <modulo641@gmail.com> | 2024-02-12 15:39:32 +0900 |
|---|---|---|
| committer | Shoyu Vanilla <modulo641@gmail.com> | 2024-02-12 15:46:35 +0900 |
| commit | 3856df059ed90b8fd19a82efbfb9da36f68e6bb9 (patch) | |
| tree | 7a43e8e838ec0c6fc06a3e9f9b77c4e77246f179 /compiler/rustc_ty_utils/src/layout.rs | |
| parent | 084ce5bdb5f7dc1c725f6770a8de281165ba3b0a (diff) | |
| download | rust-3856df059ed90b8fd19a82efbfb9da36f68e6bb9.tar.gz rust-3856df059ed90b8fd19a82efbfb9da36f68e6bb9.zip | |
Dejargnonize subst
Diffstat (limited to 'compiler/rustc_ty_utils/src/layout.rs')
| -rw-r--r-- | compiler/rustc_ty_utils/src/layout.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_ty_utils/src/layout.rs b/compiler/rustc_ty_utils/src/layout.rs index f20ded355b1..96f8148bf72 100644 --- a/compiler/rustc_ty_utils/src/layout.rs +++ b/compiler/rustc_ty_utils/src/layout.rs @@ -741,7 +741,7 @@ fn coroutine_layout<'tcx>( ) -> Result<Layout<'tcx>, &'tcx LayoutError<'tcx>> { use SavedLocalEligibility::*; let tcx = cx.tcx; - let subst_field = |ty: Ty<'tcx>| EarlyBinder::bind(ty).instantiate(tcx, args); + let instantiate_field = |ty: Ty<'tcx>| EarlyBinder::bind(ty).instantiate(tcx, args); let Some(info) = tcx.coroutine_layout(def_id) else { return Err(error(cx, LayoutError::Unknown(ty))); @@ -763,7 +763,7 @@ fn coroutine_layout<'tcx>( let tag_layout = cx.tcx.mk_layout(LayoutS::scalar(cx, tag)); let promoted_layouts = ineligible_locals.iter().map(|local| { - let field_ty = subst_field(info.field_tys[local].ty); + let field_ty = instantiate_field(info.field_tys[local].ty); let uninit_ty = Ty::new_maybe_uninit(tcx, field_ty); Ok(cx.spanned_layout_of(uninit_ty, info.field_tys[local].source_info.span)?.layout) }); @@ -838,7 +838,7 @@ fn coroutine_layout<'tcx>( Ineligible(_) => false, }) .map(|local| { - let field_ty = subst_field(info.field_tys[*local].ty); + let field_ty = instantiate_field(info.field_tys[*local].ty); Ty::new_maybe_uninit(tcx, field_ty) }); |
