normalize signature before passing to check_sig_compat

This commit is contained in:
David Renshaw 2017-06-29 07:58:22 -04:00
parent 32e7dcb6fb
commit 73ab5c77c2

View File

@ -76,6 +76,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
let real_sig = instance_ty.fn_sig(self.tcx);
let sig = self.erase_lifetimes(&sig);
let real_sig = self.erase_lifetimes(&real_sig);
let real_sig = self.tcx.normalize_associated_type(&real_sig);
if !self.check_sig_compat(sig, real_sig)? {
return Err(EvalError::FunctionPointerTyMismatch(real_sig, sig));
}