diff options
| author | Timo <30553356+y21@users.noreply.github.com> | 2025-02-15 10:22:11 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-15 10:22:11 +0000 |
| commit | 379c8f4bfb00cbc024df46fbffb95cf390bae0df (patch) | |
| tree | 1376292dafe8aaa738ed02f23a6f616751d719c1 | |
| parent | 0dd5c4ddebb36db0fd463cdd665e217e48acb3ae (diff) | |
| parent | 133882920bdea4fb8c6d598f85e2a2296cce242e (diff) | |
| download | rust-379c8f4bfb00cbc024df46fbffb95cf390bae0df.tar.gz rust-379c8f4bfb00cbc024df46fbffb95cf390bae0df.zip | |
Clarify example for macro_use (#14220)
Clarify example for macro_use changelog: none
| -rw-r--r-- | clippy_lints/src/macro_use.rs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/clippy_lints/src/macro_use.rs b/clippy_lints/src/macro_use.rs index 37412866539..bb6e22d9e5c 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, |
