Auto merge of #13325 - alex-semenyuk:wrong_self_convention_doc_fix, r=y21

Provide more clear example for `WRONG_SELF_CONVENTION`

Provide more clear example for `WRONG_SELF_CONVENTION`

changelog: none
This commit is contained in:
bors 2024-09-01 08:28:00 +00:00
commit a81f1c8277

View file

@ -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,