)]}'
{
  "commit": "d8df82673d5911b6112a85bf91d9adefb2c66a1a",
  "tree": "8f0461f24e9ee2efd947b47712d79297d0fda89d",
  "parents": [
    "4fcf39725a9c99bd495d8c73af83628a256ff9a9",
    "b22bffaea5e050f7f3e11d5e773abfbf25dcbae7"
  ],
  "author": {
    "name": "bors",
    "email": "bors@rust-lang.org",
    "time": "Thu Sep 03 10:24:19 2026 +0000"
  },
  "committer": {
    "name": "bors",
    "email": "bors@rust-lang.org",
    "time": "Thu Sep 03 10:24:19 2026 +0000"
  },
  "message": "Auto merge of #161306 - BoxyUwU:abby_canonical_form_always, r\u003dlcnr,khyperia\n\nabby: always store nextgen region constraints in canonical form\n\n\n\ntitle. introduce an `And`/`Or`/`LeafConstraint`/ types to reason about the structure of our region constraints. Never produce arbitrarily nested or/ands and always have constraints in an evaluated form.\r\n\r\nI kinda mucked up this PR and accidentally did two things at the same time. Not only do we immediately put everything into canonical form, we also change what it means for a region constraint to be in canonical form. Whoops :\u003e\r\n\r\nRough overview of what a `RegionConstraint` is:\r\n- `RegionConstraint` contains two things: an `AND of LEAFs` and an `OR of AND of LEAFs`. Another way of thinking about it would be to say its an `AND` consisting of arbitrarily many LEAFs and a single `OR of AND of LEAFs`\r\n- There are never any region constraints shared between all ANDs of the OR, instead they\u0027re moved into the top level AND\r\n- If the OR constraint is `false` then we wipe the top level `AND` as it doesn\u0027t matter what they are, the constraint is always going to be false\r\n- ORs never have two equivalent ANDs within them. Similarly, ANDs never have two equivalent LEAFs within them\r\n\r\nthis simplifies a lot of things conceptually as we now no longer need to worry about what state our region constraints are in. and our algorithms also don\u0027t need to handle arbitrary nesting of ors/ands :) and its a lot easier to read the debug logs :sweat_smile: \r\n\r\nI also wound up needing to do this while trying to compile `std`/`core` with `-Zassumptions-on-binders` as we would otherwise OOM from having both:\r\n- Lots of duplicate region constraints (e.g. `And(\u0027a: \u0027b, \u0027a: \u0027b)`)\r\n- Lots of region constraints shared across all elements of an `OR` (e.g. `Or(And(\u0027a: \u0027b, \u0027b: \u0027c), And(\u0027a: \u0027b, \u0027b: \u0027d))`)\r\n\r\nSome future work:\r\n- Remove `RegionConstraint::splatted_and_constraints` it\u0027s kind of weird to even need it and probably encourages bad-for-perf patterns\r\n- we Probably want some kind of fast path for pushing new leaf constraints to the region constraint storage. slash have a way to register a leaf constraint directly rather than having to make a `RegionConstraint`. Perf stuff :3\r\n\r\nIn theory this PR should mostly not have functional changes. In practice it might affect some things due to changing the exact repr of things affecting query responses. There\u0027s probably also some behaviour differences here due to us falling on our face more or less in WIP parts of abby now that we have different region constraints. I don\u0027t think any of this should be meaningful though. This PR is intended to not fundamentally change the abby algorithm :3\r\n\r\nThis PR should be reviewed commit-by-commit. There are a bunch of commits restructuring existing logic to assume their input is in canonical form as it will be by the end of the PR.\r\n\r\nThen there\u0027s the core change in `always canonical form` which actually replaces `RegionConstraint` with all the new types and updates all the locations using them.\r\n\r\nFinally there\u0027s `propagate ambiguity not evaluate` which deals with the leftover `evaluate_solver_constraint` which was mostly unnecessary now due to moving its main logic into construction of `RegionConstraint` and friends. I didn\u0027t want to make actual bug fixes in this PR so I just left some FIXMEs about some of the issues that `propagate_ambiguity` has instead of fixing them here.\r\n\r\nFixes rust-lang/project-assumptions-on-binders#14",
  "tree_diff": []
}
