Fix non-capturing closure return type coercion
This commit is contained in:
@@ -941,6 +941,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
exprs.len()
|
||||
);
|
||||
|
||||
if prev_ty == new_ty {
|
||||
return Ok(prev_ty);
|
||||
}
|
||||
|
||||
// Special-case that coercion alone cannot handle:
|
||||
// Function items or non-capturing closures of differing IDs or InternalSubsts.
|
||||
let (a_sig, b_sig) = {
|
||||
|
||||
Reference in New Issue
Block a user