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

IsVariant fails to interpolate variant names in documentation #357

Closed
alpha-tango-kilo opened this issue May 17, 2024 · 0 comments · Fixed by #360
Closed

IsVariant fails to interpolate variant names in documentation #357

alpha-tango-kilo opened this issue May 17, 2024 · 0 comments · Fixed by #360
Assignees

Comments

@alpha-tango-kilo
Copy link
Contributor

My enum:

#[derive(Debug, Clone, PartialEq, IsVariant)]
pub enum Value<'a> {
    Array(Array<'a>),
    Dictionary(Dictionary<'a>),
    Boolean(bool),
    Data(Data<'a>),
    Date(Date),
    Float(f64),
    Integer(Integer),
    Real(f64),
    String(&'a str),
    Uid(Uid),
}

cargo expand shows this:

image

Which is also what appears in the generated (local) documentation:

image

Not sure if this is an edge case I've hit or just something no one has spotted previously

If you can point me in the approximate direction I can probably write & PR a fix, looks like some quote! tomfoolery

JelteF pushed a commit that referenced this issue May 25, 2024
Resolves #357 

## Synopsis

Generated documentation is incorrect, see issue

## Solution

Ensure `stringify!` happens after `quote!` interpolation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants