Skip to content

Commit

Permalink
Auto merge of rust-lang#13325 - alex-semenyuk:wrong_self_convention_d…
Browse files Browse the repository at this point in the history
…oc_fix, r=y21

Provide more clear example for `WRONG_SELF_CONVENTION`

Provide more clear example for `WRONG_SELF_CONVENTION`

changelog: none
  • Loading branch information
bors committed Sep 1, 2024
2 parents ac914d3 + 989ebae commit a81f1c8
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 a81f1c8

Please sign in to comment.