sync (try_)instantiate_mir_and_normalize_erasing_regions implementation
try_instantiate_mir_and_normalize_erasing_regions was changed in dbc2cc8717
, but not instantiate_mir_and_normalize_erasing_regions
This commit is contained in:
parent
80399064af
commit
cd549aeffd
1 changed files with 4 additions and 2 deletions
|
@ -694,6 +694,7 @@ impl<'tcx> Instance<'tcx> {
|
|||
}
|
||||
|
||||
#[inline(always)]
|
||||
// Keep me in sync with try_instantiate_mir_and_normalize_erasing_regions
|
||||
pub fn instantiate_mir_and_normalize_erasing_regions<T>(
|
||||
&self,
|
||||
tcx: TyCtxt<'tcx>,
|
||||
|
@ -701,16 +702,17 @@ impl<'tcx> Instance<'tcx> {
|
|||
v: EarlyBinder<T>,
|
||||
) -> T
|
||||
where
|
||||
T: TypeFoldable<TyCtxt<'tcx>> + Clone,
|
||||
T: TypeFoldable<TyCtxt<'tcx>>,
|
||||
{
|
||||
if let Some(args) = self.args_for_mir_body() {
|
||||
tcx.instantiate_and_normalize_erasing_regions(args, param_env, v)
|
||||
} else {
|
||||
tcx.normalize_erasing_regions(param_env, v.skip_binder())
|
||||
tcx.normalize_erasing_regions(param_env, v.instantiate_identity())
|
||||
}
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
// Keep me in sync with instantiate_mir_and_normalize_erasing_regions
|
||||
pub fn try_instantiate_mir_and_normalize_erasing_regions<T>(
|
||||
&self,
|
||||
tcx: TyCtxt<'tcx>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue