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

Better suggestions for Fn-family trait selection errors #95260

Merged
merged 1 commit into from
Apr 1, 2022

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Mar 24, 2022

  1. Suppress suggestions to add std::ops::Fn{,Mut,Once} bounds when a type already implements Fn{,Mut,Once}
  2. Add a note that points out that a type does in fact implement Fn{,Mut,Once}, but the arguments vary (either by number or by actual arguments)
  3. Add a note that points out that a type does in fact implement Fn{,Mut,Once}, but not the right one (e.g. implements FnMut, but Fn is required).

Fixes #95147

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 24, 2022
@rust-highfive
Copy link
Collaborator

r? @davidtwco

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 24, 2022
@rust-log-analyzer

This comment has been minimized.

@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Apr 1, 2022

📌 Commit e0c8780 has been approved by davidtwco

@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 Apr 1, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 1, 2022
…askrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#95032 (Clean up, categorize and sort unstable features in std.)
 - rust-lang#95260 (Better suggestions for `Fn`-family trait selection errors)
 - rust-lang#95293 (suggest wrapping single-expr blocks in square brackets)
 - rust-lang#95344 (Make `impl Debug for rustdoc::clean::Item` easier to read)
 - rust-lang#95388 (interpret: make isize::MAX the limit for dynamic value sizes)
 - rust-lang#95530 (rustdoc: do not show primitives and keywords as private)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 94b1960 into rust-lang:master Apr 1, 2022
@rustbot rustbot added this to the 1.61.0 milestone Apr 1, 2022
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.

Bad diagnostic output for Fn traits with E0277
6 participants