revert #75443 update mir validator

This commit is contained in:
Bastian Kauschke 2020-10-26 20:32:34 +01:00
parent 1d5b7c3c96
commit cc19df627e
4 changed files with 23 additions and 104 deletions

View file

@ -108,7 +108,7 @@ impl<'cx, 'tcx> TypeFolder<'tcx> for QueryNormalizer<'cx, 'tcx> {
let ty = ty.super_fold_with(self);
let res = (|| match *ty.kind() {
ty::Opaque(def_id, substs) => {
ty::Opaque(def_id, substs) if !substs.has_escaping_bound_vars() => {
// Only normalize `impl Trait` after type-checking, usually in codegen.
match self.param_env.reveal() {
Reveal::UserFacing => ty,