pub(super) fn instantiate_opaque_types_from_value<T: TypeFoldable<'tcx>>(
        &self,
        parent_id: hir::HirId,
        value: &T,
        value_span: Span,
    ) -> T {
        let parent_def_id = self.tcx.hir().local_def_id(parent_id);
        debug!(
            "instantiate_opaque_types_from_value(parent_def_id={:?}, value={:?})",
            parent_def_id, value
        );

        let (value, opaque_type_map) =
            self.register_infer_ok_obligations(self.instantiate_opaque_types(
                parent_def_id,
                self.body_id,
                self.param_env,
                value,
                value_span,
            ));

        let mut opaque_types = self.opaque_types.borrow_mut();
        let mut opaque_types_vars = self.opaque_types_vars.borrow_mut();
        for (ty, decl) in opaque_type_map {
            let _ = opaque_types.insert(ty, decl);
            let _ = opaque_types_vars.insert(decl.concrete_ty, decl.opaque_type);
        }

        value
    }
/// Replaces the opaque types from the given value with type variables,
/// and records the `OpaqueTypeMap` for later use during writeback. See
/// `InferCtxt::instantiate_opaque_types` for more details.
Replaces the opaque types from the given value with type variables,
and records the `OpaqueTypeMap` for later use during writeback.
Replaces the opaque types from the given value with type variables and records the ` OpaqueTypeMap ` for later use during writeback .
pub(super) fn instantiate_opaque_types_from_value<T: TypeFoldable<'tcx>>(
        &self,
        parent_id: hir::HirId,
        value: &T,
        value_span: Span,
    ) -> T {
        let parent_def_id = self.tcx.hir().local_def_id(parent_id);
        debug!(
            "instantiate_opaque_types_from_value(parent_def_id={:?}, value={:?})",
            parent_def_id, value
        );
        let (value, opaque_type_map) =
            self.register_infer_ok_obligations(self.instantiate_opaque_types(
                parent_def_id,
                self.body_id,
                self.param_env,
                value,
                value_span,
            ));
        let mut opaque_types = self.opaque_types.borrow_mut();
        let mut opaque_types_vars = self.opaque_types_vars.borrow_mut();
        for (ty, decl) in opaque_type_map {
            let _ = opaque_types.insert(ty, decl);
            let _ = opaque_types_vars.insert(decl.concrete_ty, decl.opaque_type);
        }
        value
    }
pub ( super ) fn instantiate_opaque_types_from_value < T : TypeFoldable < ' tcx > > ( & self , parent_id : hir :: HirId , value : & T , value_span : Span , ) -> T { let parent_def_id = self . tcx . hir ( ) . local_def_id ( parent_id ) ; debug ! ( " " parent_def_id value ) ; let ( value , opaque_type_map ) = self . register_infer_ok_obligations ( self . instantiate_opaque_types ( parent_def_id , self . body_id , self . param_env , value , value_span , ) ) ; let mut opaque_types = self . opaque_types . borrow_mut ( ) ; let mut opaque_types_vars = self . opaque_types_vars . borrow_mut ( ) ; for ( ty , decl ) in opaque_type_map { let _ = opaque_types . insert ( ty , decl ) ; let _ = opaque_types_vars . insert ( decl . concrete_ty , decl . opaque_type ) ; } value }
Replaces the opaque types from the given value with type variables,
and records the `OpaqueTypeMap` for later use during writeback.
Replaces the opaque types from the given value with type variables and records the ` OpaqueTypeMap ` for later use during writeback .
&self
parent_id
hir::HirId
value
&T
value_span
Span
&self
parent_id
hir::HirId
value
&T
value_span
Span