1
Fork 0

Add bound_type_of

This commit is contained in:
Jack Huey 2022-05-08 15:12:56 -04:00
parent 319575ae8c
commit c92248ab9f
30 changed files with 90 additions and 83 deletions

View file

@ -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
});

View file

@ -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))
})
})