From 133882920bdea4fb8c6d598f85e2a2296cce242e Mon Sep 17 00:00:00 2001 From: alexey semenyuk Date: Sat, 15 Feb 2025 14:47:18 +0500 Subject: [PATCH] Add example for macro_use --- clippy_lints/src/macro_use.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/clippy_lints/src/macro_use.rs b/clippy_lints/src/macro_use.rs index 3741286653929..bb6e22d9e5c7f 100644 --- a/clippy_lints/src/macro_use.rs +++ b/clippy_lints/src/macro_use.rs @@ -21,7 +21,21 @@ declare_clippy_lint! { /// ### Example /// ```rust,ignore /// #[macro_use] - /// use some_macro; + /// extern crate some_crate; + /// + /// fn main() { + /// some_macro!(); + /// } + /// ``` + /// + /// Use instead: + /// + /// ```rust,ignore + /// use some_crate::some_macro; + /// + /// fn main() { + /// some_macro!(); + /// } /// ``` #[clippy::version = "1.44.0"] pub MACRO_USE_IMPORTS,