mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
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:
commit
a81f1c8277
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"]
|
#[clippy::version = "pre 1.29.0"]
|
||||||
pub WRONG_SELF_CONVENTION,
|
pub WRONG_SELF_CONVENTION,
|
||||||
style,
|
style,
|
||||||
|
|
Loading…
Reference in a new issue