Skip to content

Commit 379c8f4

Browse files
authoredFeb 15, 2025··
Clarify example for macro_use (#14220)
Clarify example for macro_use changelog: none
2 parents 0dd5c4d + 1338829 commit 379c8f4

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed
 

Diff for: ‎clippy_lints/src/macro_use.rs

+15-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,21 @@ declare_clippy_lint! {
2121
/// ### Example
2222
/// ```rust,ignore
2323
/// #[macro_use]
24-
/// use some_macro;
24+
/// extern crate some_crate;
25+
///
26+
/// fn main() {
27+
/// some_macro!();
28+
/// }
29+
/// ```
30+
///
31+
/// Use instead:
32+
///
33+
/// ```rust,ignore
34+
/// use some_crate::some_macro;
35+
///
36+
/// fn main() {
37+
/// some_macro!();
38+
/// }
2539
/// ```
2640
#[clippy::version = "1.44.0"]
2741
pub MACRO_USE_IMPORTS,

0 commit comments

Comments
 (0)
Please sign in to comment.