X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_borrowck%2Fsrc%2Ftype_check%2Fcanonical.rs;h=2b81a35052d7b6055eb277fe9c2706abfddbaa9a;hb=dc3e59cb3fe05ebd752d3a2269f501c00327be22;hp=02222c0a03cb350f9dcfdebc2b963db3f1edfcd5;hpb=3f21b812bec836dc3bc0f56d4e34b7c46ec68af1;p=rust.git diff --git a/compiler/rustc_borrowck/src/type_check/canonical.rs b/compiler/rustc_borrowck/src/type_check/canonical.rs index 02222c0a03c..2b81a35052d 100644 --- a/compiler/rustc_borrowck/src/type_check/canonical.rs +++ b/compiler/rustc_borrowck/src/type_check/canonical.rs @@ -107,11 +107,7 @@ pub(super) fn normalize_and_prove_instantiated_predicates( instantiated_predicates: ty::InstantiatedPredicates<'tcx>, locations: Locations, ) { - for (predicate, span) in instantiated_predicates - .predicates - .into_iter() - .zip(instantiated_predicates.spans.into_iter()) - { + for (predicate, span) in instantiated_predicates { debug!(?predicate); let category = ConstraintCategory::Predicate(span); let predicate = self.normalize_with_category(predicate, locations, category); @@ -185,9 +181,6 @@ pub(super) fn ascribe_user_type( 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, @@ -221,7 +214,9 @@ pub(super) fn ascribe_user_type_skip_wf( 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: &'_ _| {