Skip to content

Clippy error "useless lint attribute" when using FromPrimitive #20

@dignifiedquire

Description

@dignifiedquire

Getting this error when running latest clippy on my code, after adding FromPrimitive

error: useless lint attribute
  --> src/packet/tags/sig.rs:15:1
   |
15 | #[derive(FromPrimitive)]
   | ^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#useless_attribute

code is just a simple enum like this

#[derive(FromPrimitive)]
pub enum KeyFlag {
   First = 1,
   Second = 2,
}
  • rust version: rustc 1.32.0-nightly (25a42b2ce 2018-11-07)
  • clippy version: clippy 0.0.212 (d8b42690 2018-11-04)
  • num-derive: 0.2.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions