mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 18:15:07 +03:00
sync (try_)instantiate_mir_and_normalize_erasing_regions implementation
try_instantiate_mir_and_normalize_erasing_regions was changed in https://github.com/rust-lang/rust/commit/dbc2cc8717dd8c8006595d9e9c91ad472109165a, but not instantiate_mir_and_normalize_erasing_regions
This commit is contained in:
@@ -694,6 +694,7 @@ pub fn instantiate_mir<T>(&self, tcx: TyCtxt<'tcx>, v: EarlyBinder<&T>) -> T
|
||||
}
|
||||
|
||||
#[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 @@ pub fn instantiate_mir_and_normalize_erasing_regions<T>(
|
||||
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>,
|
||||
|
||||
Reference in New Issue
Block a user