-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Cannot have the same supertrait twice, but with different type parameters #10596
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
Comments
cc @nikomatsakis, does your current work also include this? |
On Mon, Apr 07, 2014 at 10:42:04AM -0700, Corey Richardson wrote:
Yes. |
Closing, this is now supported. |
Actually that's not true. That portion of the work never landed. |
e.g. this example still fails to compile:
I think there are some subtle issues here that would have to be addressed eventually, particularly around object types. |
I've wound up fixing this kind of by accident as part of another patch. |
Clippy Book Chapter Updates Reborn: Writing tests This PR adds a new chapter to the book: "Writing tests". The changes have been mainly done from reviews from rust-lang#9426 and some minor re-writes. ## Notes - We still need to check that the `git status`es are correct, as `cargo dev new_lint` changed a lot since 2022. - Requires rust-lang#10598: Link to "Emitting Lints" where I flagged with `FIXME:`. - To talk about the whole project, please use the tracking issue for the project rust-lang#10597 (It also contains a timeline, discussions and more information) changelog: Add a new "Writing tests" chapter to the book r? `@flip1995`
I am writing a Euclidean Vector class, and want to override some operations for it. However, when I try to add mul for both Vector-Vector multiplication and Vector-Scalar multiplication, the compiler complains that there is a
Duplicate supertrait in trait declaration
:The text was updated successfully, but these errors were encountered: