-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
indirect restrictions on Self in trait where clauses are not available when the trait is used as a bound #25409
Comments
This is a known issue - only supertraits are elaborated. This is required to ensure a trait-ref elaborates only finitely many others. As a workaround, you can always duplicate the where-clause. |
Thank you for the information and the suggested workaround, I don't think that idea crossed my mind at the time. Now if I could only remember what I needed this for in the first place... |
This is what stable says today about the test case:
|
Lang team can you P-tag? |
NVM P-low |
Dupe of #20671 ? |
I think so. Closing as a duplicate of #20671. |
As you can see, the compiler enforces the bound in the traits where clause when implementing the trait, but seems to be unaware of it when the trait is used itself as a bound.
I don't know if the traits where clause should be valid or not, however if it is valid, the compiler should be aware of the additional information provided by it.
At least if I haven't completely misunderstood something.
The text was updated successfully, but these errors were encountered: