Skip to content

[BENCH] Revert "Fix non-capturing closure return type coercion" #88926

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions compiler/rustc_typeck/src/check/coercion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1003,12 +1003,6 @@ 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);
}

// Special-case that coercion alone cannot handle:
// Function items or non-capturing closures of differing IDs or InternalSubsts.
let (a_sig, b_sig) = {
Expand Down
31 changes: 0 additions & 31 deletions src/test/ui/coercion/issue-88097.rs

This file was deleted.