Changing order of trait bounds changes available impls #75691
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-trait-system
Area: Trait system
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code (playground link):
I expected this to compile, because the trait bounds on
TraitA
are sufficient. Instead,rustc
fails to find theAddAssign<B>
bound forC::Thing
, and errors out with the following error message:(Note that the
help
message, while technically correct, is actually unhelpful here.)Meta
This bug occurs in the latest stable, beta, and nightly (this can be verified on the playground link).
This might be related to #41756.
The text was updated successfully, but these errors were encountered: