From 22477784a72ab1e5b26f8cb555f02e691d066898 Mon Sep 17 00:00:00 2001 From: Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> Date: Thu, 27 Jan 2022 14:27:38 +0000 Subject: [PATCH] Fixup changes that aren't neccessary anymore --- compiler/rustc_borrowck/src/type_check/mod.rs | 5 ----- .../rustc_const_eval/src/transform/check_consts/check.rs | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/compiler/rustc_borrowck/src/type_check/mod.rs b/compiler/rustc_borrowck/src/type_check/mod.rs index 900ee2455ef..4647610b003 100644 --- a/compiler/rustc_borrowck/src/type_check/mod.rs +++ b/compiler/rustc_borrowck/src/type_check/mod.rs @@ -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`. diff --git a/compiler/rustc_const_eval/src/transform/check_consts/check.rs b/compiler/rustc_const_eval/src/transform/check_consts/check.rs index e2dbeef35b9..49a9b911f3a 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/check.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/check.rs @@ -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; }