Skip to content

#[allow(non_camel_case_types)] doesn't work for individual enum variant #38452

Closed
@Riateche

Description

@Riateche

#[allow(non_camel_case_types)] only works if applied to the whole enum. If applied to a variant, it does nothing.

enum A {
    #[allow(non_camel_case_types)]
    B_B
}

It should either suppress the warning for that variant or give an error or warning that this directive can't be applied in this context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions