From 9346eb649d13120b6b0e84fd441aa527376c4127 Mon Sep 17 00:00:00 2001 From: Ali MJ Al-Nasrawy Date: Sun, 22 Jan 2023 16:48:58 +0300 Subject: [PATCH] assume MIR types are fully normalized --- compiler/rustc_borrowck/src/type_check/canonical.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_borrowck/src/type_check/canonical.rs b/compiler/rustc_borrowck/src/type_check/canonical.rs index 11729e2c83f..2b81a35052d 100644 --- a/compiler/rustc_borrowck/src/type_check/canonical.rs +++ b/compiler/rustc_borrowck/src/type_check/canonical.rs @@ -181,9 +181,6 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { user_ty: ty::UserType<'tcx>, span: Span, ) { - // FIXME: Ideally MIR types are normalized, but this is not always true. - let mir_ty = self.normalize(mir_ty, Locations::All(span)); - self.fully_perform_op( Locations::All(span), ConstraintCategory::Boring, @@ -217,7 +214,9 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { return; } + // FIXME: Ideally MIR types are normalized, but this is not always true. let mir_ty = self.normalize(mir_ty, Locations::All(span)); + let cause = ObligationCause::dummy_with_span(span); let param_env = self.param_env; let op = |infcx: &'_ _| {