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

Transform lifetimes in ignored fields when deriving SystemParam #7457

Closed
wants to merge 1 commit into from

Conversation

2ne1ugly
Copy link
Contributor

@2ne1ugly 2ne1ugly commented Feb 1, 2023

Objective

Solution

  • Transform lifetimes in ignored fields of the struct ('w -> '_w, 's -> '_s for get_param function macro derive)

Changelog

  • Add transform_lifetimes_in_type and its family
  • Use underscore prefix instead of w2, s2 in get_param quote (a bit like type Item above)
  • Add regression test

TODO

  • Consider expanding Type::Verbatim and Type::Macro (if it's possible?)
  • Benchmark compile time
  • Check if the code style fits correctly along with other codes
  • Fix my broken rustfmt
  • Add docs

@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-ECS Entities, components, systems, and events labels Feb 1, 2023
@alice-i-cecile
Copy link
Member

I think we should go with #7458 instead: the problem appears to be quite simple.

@2ne1ugly
Copy link
Contributor Author

2ne1ugly commented Feb 1, 2023

I think we should go with #7458 instead: the problem appears to be quite simple.

I see, closing this pr

@2ne1ugly 2ne1ugly closed this Feb 1, 2023
@2ne1ugly 2ne1ugly deleted the issue-7447 branch February 1, 2023 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid lifetime when deriving SystemParam
2 participants