-
-
Notifications
You must be signed in to change notification settings - Fork 15k
loss of implied bounds after normalization #106567
Copy link
Copy link
Labels
A-implied-boundsArea: Implied bounds / inferred outlives-boundsArea: Implied bounds / inferred outlives-boundsC-bugCategory: This is a bug.Category: This is a bug.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-implied-boundsArea: Implied bounds / inferred outlives-boundsArea: Implied bounds / inferred outlives-boundsC-bugCategory: This is a bug.Category: This is a bug.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.
This doesn't compile although it should:
It does pass if the impl is changed to
The issue here is that when we try to normalize
<&'a &'b () as Identity>::Ty, the result is&'?1 &'?2 (), where['?1, '?2]are new region variables that are unified with['a, 'b], respectively. However, when we try to compute the implied bounds after normalization, we get'?2: '?1instead of the desired bound'b: 'a.@rustbot label C-bug T-types A-implied-bounds