Skip to content

Conversation

@hasali19
Copy link
Contributor

@hasali19 hasali19 commented Mar 5, 2024

The EnumTryAs impl currently does not pass through generic parameters from the enum.

#[derive(Debug, EnumTryAs)]
    pub enum ConstantInfo<'a> {
        Utf8(bumpalo::collections::String<'a>),
    }

generates

impl ConstantInfo {
    #[must_use]
    #[inline]
    pub fn try_as_utf_8(self) -> ::core::option::Option<(bumpalo::collections::String<'a>)> {
        match self {
            ConstantInfo::Utf8(x) => Some((x)),
            _ => None,
        }
    }
    ...
}

which doesn't compile.

@Peternator7 Peternator7 merged commit 9b18468 into Peternator7:master Mar 10, 2024
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.

2 participants