mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
Refactor the current function call deduction logic to make it reusable. Call into it from `impl` deduction. Also build a generic region for the definition portion of a generic `impl` and substitute into it before accessing the witness in a specific `impl`. This is enough to get simple uses of generic `impl`s to work. The main blocker for more complex cases is that we have very little support for non-trivial deduction, so while we can deduce `forall [T:! type] T as I`, we can't deduce `forall [T:! type] C as I(T)` yet.