-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
deduce_closure_signature fails in with ambiguous self-referential aliases #156206
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)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.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
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)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.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
Type
Fields
Give feedbackNo fields configured for issues without a type.
taken from rust-lang/trait-system-refactor-initiative#191 (comment)
We currently don't decide the closure signature for
needs_supereven though we have a?expectation: for<'a> Fn(<?expectation as Foo<'a>>::Input). Doing this properly relies on higher-kinded inference variables.With higher-kinded infer vars, we could set the closure signature to
?inf[?expectation, 'a]and constrain that infer var via aProjection(<?expectation as Foo<'!a>>::Input, [?expectation, '!a])goal (where'!ais a placeholder.