Skip to content

Commit 9346eb6

Browse files
authored
assume MIR types are fully normalized
1 parent 8e68090 commit 9346eb6

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)