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

Suggest deriving required supertraits #93693

Merged
merged 3 commits into from
Feb 17, 2022
Merged

Suggest deriving required supertraits #93693

merged 3 commits into from
Feb 17, 2022

Conversation

rukai
Copy link
Contributor

@rukai rukai commented Feb 6, 2022

closes #91550

I chose to just hardcode handling for PartialOrd and PartialEq because that should be robust enough and I dont know how to go about doing it generically

r? rust-lang/diagnostics

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Feb 6, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 6, 2022
Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good start and I like the diagnostic improvement, I've left a comment with a suggestion on how we might make this more generic, but otherwise happy with this.

compiler/rustc_typeck/src/check/method/suggest.rs Outdated Show resolved Hide resolved
@davidtwco davidtwco added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 8, 2022
Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, if you want to fix the nit then go ahead and I'll approve, otherwise I'll do so in a day or two.

@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Feb 16, 2022

📌 Commit 1973f27 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 16, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 16, 2022
Suggest deriving required supertraits

closes rust-lang#91550

I chose to just hardcode handling for PartialOrd and PartialEq because that should be robust enough and I dont know how to go about doing it generically

r? rust-lang/diagnostics
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 17, 2022
…askrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#89869 (Add documentation to more `From::from` implementations.)
 - rust-lang#93479 (Use `optflag` for `--report-time`)
 - rust-lang#93693 (Suggest deriving required supertraits)
 - rust-lang#93981 (Fix suggestion to slice if scurtinee is a reference to `Result` or `Option`)
 - rust-lang#93996 (Do not suggest "is a function" for free variables)
 - rust-lang#94030 (Correctly mark the span of captured arguments in `format_args!()`)
 - rust-lang#94031 ([diagnostics] Add mentions to `Copy` types being valid for `union` fields)
 - rust-lang#94064 (Update dist-x86_64-musl to Ubuntu 20.04)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 351aa1b into rust-lang:master Feb 17, 2022
@rustbot rustbot added this to the 1.60.0 milestone Feb 17, 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.

Suggestion to derive traits does not consider needing to implement supertraits
5 participants