loss of implied bounds after normalization #106567
Labels
A-implied-bounds
Area: Implied bounds / inferred outlives-bounds
C-bug
Category: This is a bug.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
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: '?1
instead of the desired bound'b: 'a
.@rustbot label C-bug T-types A-implied-bounds
The text was updated successfully, but these errors were encountered: