Rust

Rust

Made by DeepSource

Found useless lint attribute RS-W1074

Anti-pattern
Minor
Autofix

Lint attributes have no effect on crate imports. Neither can lint-attributes affect module-space attributes of the imported items.

Consider removing them or using module-wide attributes.

Bad practice

#[deny(dead_code)]
extern crate foo;
#[forbid(dead_code)]
use foo::bar;

Recommended

extern crate foo;
use foo::bar;

// or
#![forbid(dead_code)]

extern crate foo;
use foo::bar;