Skip to content

Commit

Permalink
Provide more clear example for WRONG_SELF_CONVENTION
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-semenyuk committed Aug 31, 2024
1 parent 603d5a1 commit 989ebae
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,17 @@ declare_clippy_lint! {
/// }
/// }
/// ```
///
/// Use instead:
/// ```no_run
/// # struct X;
/// impl X {
/// fn as_str(&self) -> &'static str {
/// // ..
/// # ""
/// }
/// }
/// ```
#[clippy::version = "pre 1.29.0"]
pub WRONG_SELF_CONVENTION,
style,
Expand Down

0 comments on commit 989ebae

Please sign in to comment.