Revert "Normalize function type during validation"
This reverts commit d486bfcbff
.
This commit is contained in:
parent
8247223f74
commit
0ab44584aa
3 changed files with 8 additions and 16 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue