-
Notifications
You must be signed in to change notification settings - Fork 2
[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
base: main
Are you sure you want to change the base?
Conversation
- 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.
…the published version
@@ -67,9 +94,26 @@ mod tests { | |||
DateOfBirth(u32, u32, u32), | |||
} | |||
|
|||
#[allow(dead_code)] | |||
#[derive(EnumDisplay)] | |||
enum TestEnumWithGenerics<'a, T: Clone> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Details
Branched from #5, see that PR for full details.
Fixes
gen
as it's a reserved keywordcargo clippy
andcargo fmt