Skip to content
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

Don't say that a type is uncallable if its fn signature has errors in it #113578

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

compiler-errors
Copy link
Member

This is fallout from #106309, where we don't consider param-env candidates that reference errors because they unify with everything. This means, however, that we don't consider an APIT like impl Fn(MissingType) isn't considered to implement Fn, for example.

We can double-check that with a weaker heuristic extract_callable_info, and suppress the knock-down error using that.

Fixes #113566

@compiler-errors compiler-errors changed the title Don't say that a type is uncallable if its signature has errors in it Don't say that a type is uncallable if its fn signature has errors in it Jul 11, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jul 11, 2023

r? @b-naber

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 11, 2023
@rust-log-analyzer

This comment has been minimized.

@b-naber
Copy link
Contributor

b-naber commented Jul 25, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 25, 2023

📌 Commit c0c2d39 has been approved by b-naber

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 25, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 25, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#112995 (Check for `<&NotClone as Clone>::clone()` calls and suggest to add Clone trait appropriately)
 - rust-lang#113578 (Don't say that a type is uncallable if its fn signature has errors in it)
 - rust-lang#113661 (Double check that hidden types match the expected hidden type)
 - rust-lang#114044 (factor out more stable impls)
 - rust-lang#114062 (CI: split nested GHA groups instead of panicking)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a6bf68d into rust-lang:master Jul 26, 2023
11 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Jul 26, 2023
@compiler-errors compiler-errors deleted the uncallable-sig branch August 11, 2023 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Confusing diagnostic when argument type in impl FnOnce() is not found
5 participants