Provide more clear example for WRONG_SELF_CONVENTION

This commit is contained in:
alexey semenyuk 2024-08-29 10:55:42 +05:00 committed by Alexey Semenyuk
parent 603d5a19c9
commit 989ebae2ba

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"] #[clippy::version = "pre 1.29.0"]
pub WRONG_SELF_CONVENTION, pub WRONG_SELF_CONVENTION,
style, style,