Add explanatory comment

This commit is contained in:
Fabian Wolff 2021-08-31 23:44:15 +02:00
parent 2884a74d08
commit bbe3be9bf8

View File

@ -941,6 +941,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
exprs.len()
);
// The following check fixes #88097, where the compiler erroneously
// attempted to coerce a closure type to itself via a function pointer.
if prev_ty == new_ty {
return Ok(prev_ty);
}