Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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