"approximate check" for outlives relations can miss matches #54572
Labels
A-NLL
Area: Non-lexical lifetimes (NLL)
NLL-complete
Working towards the "valid code works" goal
P-low
Low priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Per this comment, the current system for handling outlives obligations relies on an "approximate" match for outlives relations that is actually kind of flawed in some edge cases, which can lead to us overconstraining inference:
Originally, I had intended to fix this by using the "type relation" code from the NLL type checker, but in a mode where it ignored all the outlives relations. I introduced the idea of an "outlives delegate" and so forth in preparation for that but then never took the last step, since "erasing obligations" seemed simpler and sufficient for the moment.
The text was updated successfully, but these errors were encountered: