mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-24 19:55:11 +00:00
If a facet type contains `.X impls Y` then later references to `.X` should know that it impls `Y`. This is done through a stack on the context like for rewrites, where impl lookup can find constraints from the current `where` expression being checked. Similarly, if a facet type contains `.X impls (Y where .Z = T)`, then `.X.(Y.Z) = T` should be available to later constraints in the facet type for early application of rewrite rules. We add these rewrites to the rewrite stack when handling the `impls` constraint