Impl has "stricter" requirement that is implied by existing requirement #134890
Labels
A-implied-bounds
Area: Implied bounds / inferred outlives-bounds
A-trait-system
Area: Trait system
C-bug
Category: This is a bug.
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
I tried this code:
I expect this to compile, but it gives the following error
The extra requirement
<A as Foo>::Assoc: 'x
that it mentions is actually implied by the real requirementSelf::Assoc: 'x
.I think rust should always accept trait impls that have the exact same bounds as the trait defintion, that is why I labeled this as a bug.
Meta
rustc --version --verbose
:Same result on stable
The text was updated successfully, but these errors were encountered: