RS.CLIPPY.MACRO_USE_IMPORTS
#[macro_use] is no longer needed
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: macro_use_imports. Copyright ©2025 The Rust Team. All rights reserved.
What it does
Checks for #[macro_use] use....
Why is this bad?
Since the Rust 2018 edition you can import macro's directly, this is considered idiomatic.
Example
#[macro_use]
extern crate some_crate;
fn main() {
some_macro!();
}
Use instead:
use some_crate::some_macro;
fn main() {
some_macro!();
}