Conflicting implementation should not exist after generic trait paramters have been constrained to associated types #123450
Labels
A-associated-items
Area: Associated items such as associated types and consts.
A-coherence
Area: Coherence
A-traits
Area: Trait system
C-discussion
Category: Discussion or questions that doesn't represent real issues.
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Consider this code. Currently it cannot compile.
The type solver assumed downstream can impl
FooBy<Bar::Impl>
for typeBar
. But this is easy to reject with orphan rules.Bar::Impl
must be in the same scope asBar
itself. ThereforeFooBy<Bar::Impl>
cannot be implemented onBar
outside its origin crate.The text was updated successfully, but these errors were encountered: