1
Fork 0

Revert "Normalize function type during validation"

This reverts commit d486bfcbff.
This commit is contained in:
Tomasz Miąsko 2020-11-19 05:36:55 +01:00
parent 8247223f74
commit 0ab44584aa
3 changed files with 8 additions and 16 deletions

View file

@ -364,9 +364,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
}
}
TerminatorKind::Call { func, args, destination, cleanup, .. } => {
let param_env = self.param_env.with_reveal_all_normalized(self.tcx);
let func_ty = func.ty(&self.body.local_decls, self.tcx);
let func_ty = self.tcx.normalize_erasing_regions(param_env, func_ty);
match func_ty.kind() {
ty::FnPtr(..) | ty::FnDef(..) => {}
_ => self.fail(