Skip to content

[CLONE/FIXES][FEATURE]: Generics, lifetimes, where clauses and internal field variant formatting #6

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

SeedyROM
Copy link
Owner

@SeedyROM SeedyROM commented Jul 14, 2025

Details

Branched from #5, see that PR for full details.

Fixes

  • Issues with pipeline using previously published proc macro, use a workspace locally and have versions and paths available.
  • Remove functions called gen as it's a reserved keyword
  • Run cargo clippy and cargo fmt

jngls and others added 6 commits June 16, 2025 21:16
- Bump version number before publish
- `gen` is a reserved keyword: https://doc.rust-lang.org/edition-guide/rust-2024/gen-keyword.html
- Rename all functions named `gen` to `generate`
- Allow for local testing via workspaces, however when publishing the local dep needs to be replaced with the published version
   - This allowed for the actual proc_macro code changes to propegate into the local build.
@SeedyROM SeedyROM self-assigned this Jul 14, 2025
@SeedyROM SeedyROM changed the title [FEATURE]: Generics, lifetimes, where clauses and internal field variant formatting [CLONE/FIXES][FEATURE]: Generics, lifetimes, where clauses and internal field variant formatting Jul 14, 2025
@@ -67,9 +94,26 @@ mod tests {
DateOfBirth(u32, u32, u32),
}

#[allow(dead_code)]
#[derive(EnumDisplay)]
enum TestEnumWithGenerics<'a, T: Clone>
Copy link
Owner Author

Choose a reason for hiding this comment

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

Should this struct be called TestEnumWithLifetimeAndGenerics? Enforcing that each generic have a lifetime doesn't make much sense.

Copy link
Owner Author

@SeedyROM SeedyROM Jul 15, 2025

Choose a reason for hiding this comment

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

We should probably have tests for both. One where the test struct has T's without references, or boxed Ts.

SeedyROM

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant