about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-02-28 18:16:15 +0000
committerbors <bors@rust-lang.org>2023-02-28 18:16:15 +0000
commit2d9ca944fa066d4873313092aa1ec18aa2781df4 (patch)
treebeee79c30dbc4d08f39957ba574ecd983f5bcb1e
parentba86a99d247d318b5bbb2b8f81f1d71f05978847 (diff)
parent90ba82bd396cf95cb02318e43a66015cc3f65d7b (diff)
downloadrust-2d9ca944fa066d4873313092aa1ec18aa2781df4.tar.gz
rust-2d9ca944fa066d4873313092aa1ec18aa2781df4.zip
Auto merge of #10425 - smoelius:docs, r=llogiq
Two small documentation improvements

The `wrong_self_convention` changes are for grammar and accuracy.

The `must_use_candidate` change is because that lint flags only exported functions: https://github.com/rust-lang/rust-clippy/blob/8b65632b6ef737979d42f83664271d6baa8c0270/clippy_lints/src/functions/must_use.rs#L27-L31

changelog: `wrong_self_convention` and `must_use_candidate` documentation improvements
-rw-r--r--clippy_lints/src/functions/mod.rs2
-rw-r--r--clippy_lints/src/methods/mod.rs5
2 files changed, 4 insertions, 3 deletions
diff --git a/clippy_lints/src/functions/mod.rs b/clippy_lints/src/functions/mod.rs
index d2852b4acad..7c5e44bb7dc 100644
--- a/clippy_lints/src/functions/mod.rs
+++ b/clippy_lints/src/functions/mod.rs
@@ -185,7 +185,7 @@ declare_clippy_lint! {
     /// ### Examples
     /// ```rust
     /// // this could be annotated with `#[must_use]`.
-    /// fn id<T>(t: T) -> T { t }
+    /// pub fn id<T>(t: T) -> T { t }
     /// ```
     #[clippy::version = "1.40.0"]
     pub MUST_USE_CANDIDATE,
diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs
index 702df4b282b..56e3988bf09 100644
--- a/clippy_lints/src/methods/mod.rs
+++ b/clippy_lints/src/methods/mod.rs
@@ -340,8 +340,9 @@ declare_clippy_lint! {
 
 declare_clippy_lint! {
     /// ### What it does
-    /// Checks for methods with certain name prefixes and which
-    /// doesn't match how self is taken. The actual rules are:
+    /// Checks for methods with certain name prefixes or suffixes, and which
+    /// do not adhere to standard conventions regarding how `self` is taken.
+    /// The actual rules are:
     ///
     /// |Prefix |Postfix     |`self` taken                   | `self` type  |
     /// |-------|------------|-------------------------------|--------------|