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 suggestion for duplicated where clause #93571

Merged
merged 1 commit into from
Feb 2, 2022

Conversation

compiler-errors
Copy link
Member

fixes #93567

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

r? @lcnr

(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 Feb 2, 2022
Copy link
Contributor

@lcnr lcnr 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 already good, do you think that extending the lint to cover

struct A where (): Sized, where (): Sized {}
//~^ ERROR cannot define duplicate `where` clauses on an item

fn foo() where (): Sized, where (): Sized {}
//~^ ERROR cannot define duplicate `where` clauses on an item

enum B where (): Sized, where (): Sized {}
//~^ ERROR cannot define duplicate `where` clauses on an item

fn main() {}

is also worth it. i.e. deal with , where?

if you don't want to deal with that, r=me

@compiler-errors
Copy link
Member Author

Good point. I'll do that too, seems like something that someone might accidentally type.

@compiler-errors
Copy link
Member Author

@rustbot author

@rustbot rustbot 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 2, 2022
@compiler-errors
Copy link
Member Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 2, 2022
@lcnr
Copy link
Contributor

lcnr commented Feb 2, 2022

@bors r+ rollup

thanks ❤️

@bors
Copy link
Contributor

bors commented Feb 2, 2022

📌 Commit f35d43c has been approved by lcnr

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

Rollup of 8 pull requests

Successful merges:

 - rust-lang#92528 (Make `Fingerprint::combine_commutative` associative)
 - rust-lang#93221 ([borrowck] Fix help on mutating &self in async fns)
 - rust-lang#93542 (Prevent lifetime elision in type alias)
 - rust-lang#93546 (Validate that values in switch int terminator are unique)
 - rust-lang#93571 (better suggestion for duplicated `where` clause)
 - rust-lang#93574 (don't suggest adding `let` due to bad assignment expressions inside of `while` loop)
 - rust-lang#93590 (More let_else adoptions)
 - rust-lang#93592 (Remove unused dep from rustc_arena)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ef50086 into rust-lang:master Feb 2, 2022
@rustbot rustbot added this to the 1.60.0 milestone Feb 2, 2022
@compiler-errors compiler-errors deleted the better-where-suggestion branch April 7, 2022 04:34
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.

Compiler expected where but there is a where
5 participants