Skip to content

Commit 001a77f

Browse files
committed
Auto merge of #107197 - aliemjay:patch-2, r=jackh726
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`.
2 parents a322848 + 9346eb6 commit 001a77f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

compiler/rustc_borrowck/src/type_check/canonical.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,6 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
181181
user_ty: ty::UserType<'tcx>,
182182
span: Span,
183183
) {
184-
// FIXME: Ideally MIR types are normalized, but this is not always true.
185-
let mir_ty = self.normalize(mir_ty, Locations::All(span));
186-
187184
self.fully_perform_op(
188185
Locations::All(span),
189186
ConstraintCategory::Boring,
@@ -217,7 +214,9 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
217214
return;
218215
}
219216

217+
// FIXME: Ideally MIR types are normalized, but this is not always true.
220218
let mir_ty = self.normalize(mir_ty, Locations::All(span));
219+
221220
let cause = ObligationCause::dummy_with_span(span);
222221
let param_env = self.param_env;
223222
let op = |infcx: &'_ _| {

0 commit comments

Comments
 (0)