-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Conversation
r? @lcnr (rust-highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this 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
Good point. I'll do that too, seems like something that someone might accidentally type. |
@rustbot author |
aab4891
to
f35d43c
Compare
@rustbot ready |
@bors r+ rollup thanks ❤️ |
📌 Commit f35d43c has been approved by |
…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
fixes #93567