Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hypothetical lifetime to structure rewrites with empty generic type parameter lists #956

Merged
merged 2 commits into from
Jun 13, 2023

Conversation

aneksteind
Copy link
Contributor

@aneksteind aneksteind commented Jun 12, 2023

Deconstructing an HIR field type would fail in the case where there where the field type had no generic parameters, in that it would not be rewritten to include the new hypothetical lifetimes. Now the type is deconstructed correctly by providing an empty generic type parameter list, which allows the hir_args to have the correct value and allows adt_ty_rw to run and generate a rewrite for the ADT

@aneksteind aneksteind changed the title Addresses #949 Add hypothetical lifetime to structure rewrites with empty generic type parameter lists Jun 12, 2023
Deconstructing an HIR field type would fail in the case where there where the field type had no generic parameters, in that it would not be rewritten to include the new hypothetical lifetimes. Now the type is deconstructed correctly by providing an empty generic type parameter list, which allows the hir_args to have the correct value and allows `adt_ty_rw` to run and generate a rewrite for the ADT
Copy link
Contributor

@fw-immunant fw-immunant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this fixes the bug (so approving), but I think the handling should change; see comment.

@aneksteind aneksteind merged commit 8dcef23 into master Jun 13, 2023
@aneksteind aneksteind deleted the fix.field.generic branch June 13, 2023 17:09
@aneksteind aneksteind linked an issue Jun 13, 2023 that may be closed by this pull request
aneksteind added a commit that referenced this pull request Jun 13, 2023
It turns out #952 was addressed indirectly via #956. This adds a test
case to demonstrate the functionality is now working as expected.
aneksteind added a commit that referenced this pull request Jun 26, 2023
A test case to show #905 has been resolved by #956. Relevant: #952
@aneksteind aneksteind mentioned this pull request Aug 2, 2023
aneksteind added a commit that referenced this pull request Aug 2, 2023
Adds test showing #995 and #990 are fixed. I believe #1005 and #956
combined fixed these issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants