Provide more clear example for WRONG_SELF_CONVENTION
This commit is contained in:
parent
603d5a19c9
commit
989ebae2ba
1 changed files with 11 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue