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

enum_primitive! doesn't work in combination with custom_derive! #7

Open
norru opened this issue Aug 30, 2016 · 1 comment
Open

enum_primitive! doesn't work in combination with custom_derive! #7

norru opened this issue Aug 30, 2016 · 1 comment

Comments

@norru
Copy link

norru commented Aug 30, 2016

enum_from_primitive! {
custom_derive! {
    #[derive(Debug, Eq, PartialEq, Hash, Copy, Clone, IterVariants(AgentTypeVariants))]
    pub enum AgentType {
        Minion ,
        Spore,
        Player,
        FriendlyBullet,
        Enemy,
        EnemyBullet,
        Resource,
        Prop,
    }
}
}

fails with

src/backend/world/mod.rs:21:1: 21:14 error: no rules expected the token `custom_derive`
src/backend/world/mod.rs:21 custom_derive! {
@cardoe
Copy link

cardoe commented Aug 30, 2017

fwiw, https://crates.io/crates/enum-primitive-derive should work in that case a bit better.

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