-
-
Notifications
You must be signed in to change notification settings - Fork 15k
False ambiguity due to overlap between higher-ranked and other where clause #27834
Copy link
Copy link
Open
Labels
A-higher-rankedArea: Higher-ranked things (e.g., lifetimes, types, trait bounds aka HRTBs)Area: Higher-ranked things (e.g., lifetimes, types, trait bounds aka HRTBs)A-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-higher-rankedArea: Higher-ranked things (e.g., lifetimes, types, trait bounds aka HRTBs)Area: Higher-ranked things (e.g., lifetimes, types, trait bounds aka HRTBs)A-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
The test at http://is.gd/xHYV2z was extracted from the
qcollect-traitspackage 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.)