Projections fail to unify projections in related obligations #108933
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-lazy-normalization
Area: Lazy normalization (tracking issue: #60471)
C-bug
Category: This is a bug.
fixed-by-next-solver
Fixed by the next-generation trait solver, `-Znext-solver`.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
Function
g
isf
with()
replaced withUnit
in first where clause, while functionh
isf
with()
replaced withUnit
in second where clause. SinceUnit
is effectively a type alias for()
, I expected all three functions to compile.Instead, the compiler complains about
g
:The compiler suggests adding
Trait<()>
onT
, which should not be necessary sinceTrait<Unit>
has exactly the same meaning asTrait<()>
(and it actually works that way forh
). HavingUnit
type alias is not essential, inlining it yields the same error.(Also it complains about the same unsatisfied bound twice, but it is less of an issue, I guess)
Meta
I used the latest stable at the moment, 1.67.1, but it can also be reproduced on the latest beta (
2023-03-06 b955c8271da80a1af8a1
) and latest nigthly (2023-03-06 b955c8271da80a1af8a1
) at the moment.Probably related to #43049.
@rustbot label: +A-associated-items
The text was updated successfully, but these errors were encountered: