Provide more clear example for WRONG_SELF_CONVENTION
This commit is contained in:
parent
603d5a19c9
commit
989ebae2ba
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user