Skip to content

Commit a81f1c8

Browse files
committed
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
2 parents ac914d3 + 989ebae commit a81f1c8

File tree

1 file changed

+11
-0
lines changed
  • clippy_lints/src/methods

1 file changed

+11
-0
lines changed

clippy_lints/src/methods/mod.rs

+11
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,17 @@ declare_clippy_lint! {
441441
/// }
442442
/// }
443443
/// ```
444+
///
445+
/// Use instead:
446+
/// ```no_run
447+
/// # struct X;
448+
/// impl X {
449+
/// fn as_str(&self) -> &'static str {
450+
/// // ..
451+
/// # ""
452+
/// }
453+
/// }
454+
/// ```
444455
#[clippy::version = "pre 1.29.0"]
445456
pub WRONG_SELF_CONVENTION,
446457
style,

0 commit comments

Comments
 (0)