Skip to content

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

Open
@norru

Description

@norru
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! {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions