Fixup changes that aren't neccessary anymore

This commit is contained in:
Oli Scherer 2022-01-27 14:27:38 +00:00
parent 94d6a9acc9
commit 22477784a7
2 changed files with 2 additions and 7 deletions

View file

@ -1745,11 +1745,6 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
fn ensure_place_sized(&mut self, ty: Ty<'tcx>, span: Span) {
let tcx = self.tcx();
// This may contain opaque types, resolve them to the underlying
// type if defined in the current function. Otherwise we can't
// necessarily prove sizedness of the type.
let ty = self.infcx.resolve_vars_if_possible(ty);
// Erase the regions from `ty` to get a global type. The
// `Sized` bound in no way depends on precise regions, so this
// shouldn't affect `is_sized`.

View file

@ -48,7 +48,7 @@ impl<'mir, 'tcx> Qualifs<'mir, 'tcx> {
let ty = ccx.body.local_decls[local].ty;
// Peeking into opaque types causes cycles if the current function declares said opaque
// type. Thus we avoid short circuiting on the type and instead run the more expensive
// analysis that looks at the actual usage withhin this function
// analysis that looks at the actual usage within this function
if !ty.has_opaque_types() && !NeedsDrop::in_any_value_of_ty(ccx, ty) {
return false;
}
@ -105,7 +105,7 @@ impl<'mir, 'tcx> Qualifs<'mir, 'tcx> {
let ty = ccx.body.local_decls[local].ty;
// Peeking into opaque types causes cycles if the current function declares said opaque
// type. Thus we avoid short circuiting on the type and instead run the more expensive
// analysis that looks at the actual usage withhin this function
// analysis that looks at the actual usage within this function
if !ty.has_opaque_types() && !HasMutInterior::in_any_value_of_ty(ccx, ty) {
return false;
}