better suggestion for duplicated where clause#93571
Merged
bors merged 1 commit intorust-lang:masterfrom Feb 2, 2022
Merged
Conversation
Contributor
|
r? @lcnr (rust-highfive has picked a reviewer for you, use r? to override) |
lcnr
approved these changes
Feb 2, 2022
Contributor
There was a problem hiding this comment.
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
Contributor
Author
|
Good point. I'll do that too, seems like something that someone might accidentally type. |
Contributor
Author
|
@rustbot author |
aab4891 to
f35d43c
Compare
Contributor
Author
|
@rustbot ready |
Contributor
|
@bors r+ rollup thanks ❤️ |
Collaborator
|
📌 Commit f35d43c has been approved by |
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #93567