False ambiguity due to overlap between higher-ranked and other where clause #27834
Labels
A-higher-ranked
Area: Higher-ranked things (e.g., lifetimes, types, trait bounds aka HRTBs)
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.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
The test at http://is.gd/xHYV2z was extracted from the
qcollect-traits
package on crates.io. It fails to compile due to a false ambiguity between the higher-ranked where-clause and the other one. This is particularly frustrating because the ambiguity occurs as part of projection and the higher-ranked where clause doesn't even list a binding forOutput
.The correct fix is probably to prune one where clause or the other as part of selection, but this is a bit tricky with the current region setup due to #21974.
(Due to this bug, PR #27641 causes a regression in
qcollect-traits
, but the problem is pre-existing.)The text was updated successfully, but these errors were encountered: