Skip to content

Commit

Permalink
Auto merge of #107197 - aliemjay:patch-2, r=jackh726
Browse files Browse the repository at this point in the history
assume MIR types are fully normalized in ascribe_user_type

This FIXME was introduced in c6a17bf but it should've been restricted to `ascribe_user_type_skip_wf`.
  • Loading branch information
bors committed Jan 30, 2023
2 parents a322848 + 9346eb6 commit 001a77f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions compiler/rustc_borrowck/src/type_check/canonical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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: &'_ _| {
Expand Down

0 comments on commit 001a77f

Please sign in to comment.