change usages of type_of to bound_type_of

This commit is contained in:
Kyle Matsuda
2023-02-06 17:48:12 -07:00
parent 9a7cc6c32f
commit d822b97a27
136 changed files with 385 additions and 262 deletions

View File

@@ -453,9 +453,10 @@ fn layout_of_uncached<'tcx>(
let param_env = tcx.param_env(def.did());
def.is_struct()
&& match def.variants().iter().next().and_then(|x| x.fields.last()) {
Some(last_field) => {
tcx.type_of(last_field.did).is_sized(tcx, param_env)
}
Some(last_field) => tcx
.bound_type_of(last_field.did)
.subst_identity()
.is_sized(tcx, param_env),
None => false,
}
},