Skip to content

Commit

Permalink
doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
lengyijun committed Nov 7, 2024
1 parent 05a7c12 commit bfc0849
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions clippy_lints/src/use_crate_prefix_for_self_imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,30 @@ declare_clippy_lint! {
/// This helps reduce confusion and maintain a uniform codebase.
///
/// ### Example
/// ```no_run
/// use foo::bar; // foo is a module in the current crate
/// ```rust,ignore
/// // lib.rs
/// mod foo;
/// use foo::bar;
/// ```
///
/// ```rust,ignore
/// // foo.rs
/// #[path = "./foo.rs"]
/// pub fn bar() {}
/// ```
///
/// Use instead:
/// ```no_run
/// ```rust,ignore
/// // lib.rs
/// mod foo;
/// use crate::foo::bar;
/// ```
///
/// ```rust,ignore
/// // foo.rs
/// #[path = "./foo.rs"]
/// pub fn bar() {}
/// ```
#[clippy::version = "1.84.0"]
pub USE_CRATE_PREFIX_FOR_SELF_IMPORTS,
style,
Expand Down

0 comments on commit bfc0849

Please sign in to comment.