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

Support parent-only proc-macros #26

Open
paholg opened this issue Sep 19, 2023 · 0 comments
Open

Support parent-only proc-macros #26

paholg opened this issue Sep 19, 2023 · 0 comments

Comments

@paholg
Copy link
Owner

paholg commented Sep 19, 2023

Fixing #15 revealed another issue with documentation: We cannot have documentation on the parent separate from the child.

We can already provide documentation on the child only (thanks to #21), but the parent's documentation also shows up.

Example:

/// Enum Foo
#[subenum(Bar(doc = "Enum Bar"))]
pub enum Foo {
    /// Variant A of Foo
    #[subenum(Bar(doc = "Variant A of Bar"))]
    A,
    /// Variant B of Foo
    B,
}

Will result in the following definition of Bar:

///Enum Bar
/// Enum Foo
pub enum Bar {
    ///Variant A of Bar
    /// Variant A of Foo
    A,
}

Perhaps we should solve this in a more general way; we already have subenum-specific proc-macros, also allowing parent-specific ones would do it.

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

1 participant