change usages of type_of to bound_type_of
This commit is contained in:
parent
9a7cc6c32f
commit
d822b97a27
136 changed files with 385 additions and 262 deletions
|
@ -690,7 +690,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
assert!(self.tcx.is_static(def_id));
|
||||
assert!(!self.tcx.is_thread_local_static(def_id));
|
||||
// Use size and align of the type.
|
||||
let ty = self.tcx.type_of(def_id);
|
||||
let ty = self.tcx.bound_type_of(def_id).subst_identity();
|
||||
let layout = self.tcx.layout_of(ParamEnv::empty().and(ty)).unwrap();
|
||||
assert!(layout.is_sized());
|
||||
(layout.size, layout.align.abi, AllocKind::LiveData)
|
||||
|
|
|
@ -68,7 +68,7 @@ impl<'mir, 'tcx> ConstCx<'mir, 'tcx> {
|
|||
pub fn fn_sig(&self) -> PolyFnSig<'tcx> {
|
||||
let did = self.def_id().to_def_id();
|
||||
if self.tcx.is_closure(did) {
|
||||
let ty = self.tcx.type_of(did);
|
||||
let ty = self.tcx.bound_type_of(did).subst_identity();
|
||||
let ty::Closure(_, substs) = ty.kind() else { bug!("type_of closure not ty::Closure") };
|
||||
substs.as_closure().sig()
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue