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

Feat: #[derive(EnumDiscriminants)] customize doc comment "Auto-generated discriminant enum variants" on generated #416

Open
tgrushka opened this issue Feb 14, 2025 · 1 comment

Comments

@tgrushka
Copy link

Is there any way to customize the doc comment?

It shows up as "Auto-generated discriminant enum variants" in generated docs for the crate.

It seems like it's hard-coded at https://github.com/Peternator7/strum/blob/master/strum_macros/src/macros/enum_discriminants.rs#L184

I tried using #[doc = r"something"] as well as adding /// doc comments to the enum, but they don't get propagated.

Is there any way to add an attribute on #[strum_disciminants] to override the generated doc comment, or something similar?

Thanks.

@Peternator7
Copy link
Owner

This was also brought up in #140 and it looks like that PR never made it across the finish line. Looking through other issues to see if there's anything else I want to bundle into a release so it'll probably be a few weeks before it's available on crates.io.

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

No branches or pull requests

2 participants