Skip to content

proc-macro applied with cfg_attr doesn’t see associated attributes #10110

Open
@b8591340

Description

@b8591340

#[cfg_attr(debug_assertions, derive(EnumKind), enum_kind(Kind, repr(u32)))]

#[macro_use]
extern crate enum_kinds;

#[cfg_attr(debug_assertions, derive(EnumKind), enum_kind(ValueId, repr(u32)))]
enum Value {
    A,
    B,
}
proc macro returned error: proc-macro panicked:
#[derive(EnumKind)] requires an associated `enum_kind` attribute to be specified

rustc 1.56.0-nightly (2f662b140 2021-08-29)

cargo check works, it builds correctly both in debug and release profiles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macromacro expansionE-hardS-actionableSomeone could pick this issue up and work on it right now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions