trait solver: Handle reflexive region constraints - #161988
Conversation
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
Sup @BoxyUwU and @adwinwhite o/ The first check handles When I followed that path, some information was missing from the assumptions used at the root. The implied There's a similar problem while leaving a binder. If the binder's own assumptions already prove At the root, a I added tests for direct and transitive assumptions, type outlives assumptions, and the root case. The full My take is that #161963 is a good small fix for #161733, while this PR now deals with the wider path behind #19. I would keep the extra work here, but I'm not sure where you want the PR boundary. Would you rather keep it this way or move the extra changes to a follow-up on #161963? |
Fixes rust-lang/project-assumptions-on-binders#19
A reflexive placeholder constraint like
'a: 'acan show up after we compute transitive region constraints. We then try to pull it out of the current universe by looking for lower-universe candidates. With none to choose from it becomes false, even though'a: 'awas true the whole time.I first had this buried in the binder region work, which made a green test pretty meaningless because too much else was changing around it. Split out on its own, the fix is just to accept equal regions before doing the universe rewrite. I think that is the sensible place to stop: it handles the direct case and the reflexive edges made by the transitive pass. I added a regression for the direct case.
cc/ @BoxyUwU o/