Integrate trait impls into template specialization logic.#766
Open
copybara-service[bot] wants to merge 1 commit intomainfrom
Open
Integrate trait impls into template specialization logic.#766copybara-service[bot] wants to merge 1 commit intomainfrom
copybara-service[bot] wants to merge 1 commit intomainfrom
Conversation
c06f00f to
7a5335b
Compare
Trait impls predate the logic around emitting template specializations, and so had special case logic to emit in the right location. Now that we have actual logic for placing template specializations correctly in bindings, we don't need the special case logic. This revealed an issue around template specialization where trait impls can, understandably, produce specializations of `Result`/`Option`. I think a simpler hiearchy of `handle trait impls` -> `handle result/option specializations` would suffice, but I opted to use a fixpoint of specializations instead so that such issues do not continue to arise in the future. It is absolutely debatable if this is warranted. PiperOrigin-RevId: 890047063
7a5335b to
4f3cea4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrate trait impls into template specialization logic.
Trait impls predate the logic around emitting template specializations,
and so had special case logic to emit in the right location. Now that we
have actual logic for placing template specializations correctly in
bindings, we don't need the special case logic.
This revealed an issue around template specialization where trait impls
can, understandably, produce specializations of
Result/Option. Ithink a simpler hiearchy of
handle trait impls->handle result/option specializationswould suffice, but I opted to use afixpoint of specializations instead so that such issues do not continue
to arise in the future. It is absolutely debatable if this is warranted.