pub fn static_ptr_ty(&self, def_id: DefId) -> Ty<'tcx> {
        // Make sure that any constants in the static's type are evaluated.
        let static_ty = self.normalize_erasing_regions(
            ty::ParamEnv::empty(),
            self.type_of(def_id),
        );

        if self.is_mutable_static(def_id) {
            self.mk_mut_ptr(static_ty)
        } else if self.is_foreign_item(def_id) {
            self.mk_imm_ptr(static_ty)
        } else {
            self.mk_imm_ref(self.lifetimes.re_erased, static_ty)
        }
    }
/// Get the type of the pointer to the static that we use in MIR.
Get the type of the pointer to the static that we use in MIR.
Get the type of the pointer to the static that we use in MIR .
pub fn static_ptr_ty(&self, def_id: DefId) -> Ty<'tcx> {
        // Make sure that any constants in the static's type are evaluated.
        let static_ty = self.normalize_erasing_regions(
            ty::ParamEnv::empty(),
            self.type_of(def_id),
        );
        if self.is_mutable_static(def_id) {
            self.mk_mut_ptr(static_ty)
        } else if self.is_foreign_item(def_id) {
            self.mk_imm_ptr(static_ty)
        } else {
            self.mk_imm_ref(self.lifetimes.re_erased, static_ty)
        }
    }
pub fn static_ptr_ty ( & self , def_id : DefId ) -> Ty < ' tcx > { // Make sure that any constants in the static's type are evaluated. let static_ty = self . normalize_erasing_regions ( ty :: ParamEnv :: empty ( ) , self . type_of ( def_id ) , ) ; if self . is_mutable_static ( def_id ) { self . mk_mut_ptr ( static_ty ) } else if self . is_foreign_item ( def_id ) { self . mk_imm_ptr ( static_ty ) } else { self . mk_imm_ref ( self . lifetimes . re_erased , static_ty ) } }
Get the type of the pointer to the static that we use in MIR.
Get the type of the pointer to the static that we use in MIR .
&self
def_id
DefId