Skip to content

Commit bbe3be9

Browse files
committed
Add explanatory comment
1 parent 2884a74 commit bbe3be9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/rustc_typeck/src/check/coercion.rs

+2
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
941941
exprs.len()
942942
);
943943

944+
// The following check fixes #88097, where the compiler erroneously
945+
// attempted to coerce a closure type to itself via a function pointer.
944946
if prev_ty == new_ty {
945947
return Ok(prev_ty);
946948
}

0 commit comments

Comments
 (0)