Type system limitations with double-diamond trait dependencies with bounded associated types #139486
Labels
A-trait-system
Area: Trait system
C-bug
Category: This is a bug.
fixed-by-next-solver
Fixed by the next-generation trait solver, `-Znext-solver`.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Hi - apparently whenever there is a trait dependency chain which included bounded associated types and forms a double diamond pattern, such as the one illustrated in this figure, the type system fails with the error
cannot satisfy `<Self as Red>::R == <Self as RedGreenBlue>::RGB`
, with the full backtrace reported below.I tried to simplify as much as possible the issue and I documented it in this GitHub repository.
I boiled it down to this code, which you can try out at Rust playground:
Meta
After having switched to nightly mode with
rustup default nightly
and executedrustup update
, the error persists. Here is the output of executingrustc --version --verbose
on my system:Backtrace
The text was updated successfully, but these errors were encountered: