Add bound_type_of
This commit is contained in:
parent
319575ae8c
commit
c92248ab9f
30 changed files with 90 additions and 83 deletions
|
@ -237,7 +237,7 @@ fn drop_tys_helper<'tcx>(
|
|||
Ok(Vec::new())
|
||||
} else {
|
||||
let field_tys = adt_def.all_fields().map(|field| {
|
||||
let r = EarlyBinder(tcx.type_of(field.did)).subst(tcx, substs);
|
||||
let r = tcx.bound_type_of(field.did).subst(tcx, substs);
|
||||
debug!("drop_tys_helper: Subst into {:?} with {:?} gettng {:?}", field, substs, r);
|
||||
r
|
||||
});
|
||||
|
|
|
@ -444,7 +444,7 @@ pub fn conservative_is_privately_uninhabited_raw<'tcx>(
|
|||
// one uninhabited field.
|
||||
def.variants().iter().all(|var| {
|
||||
var.fields.iter().any(|field| {
|
||||
let ty = EarlyBinder(tcx.type_of(field.did)).subst(tcx, substs);
|
||||
let ty = tcx.bound_type_of(field.did).subst(tcx, substs);
|
||||
tcx.conservative_is_privately_uninhabited(param_env.and(ty))
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue