assume MIR types are fully normalized

This commit is contained in:
Ali MJ Al-Nasrawy 2023-01-22 16:48:58 +03:00 committed by GitHub
parent 8e68090723
commit 9346eb649d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: &'_ _| {