about summary refs log tree commit diff
diff options
context:
space:
mode:
authormikerite <33983332+mikerite@users.noreply.github.com>2019-09-18 06:48:47 +0200
committerGitHub <noreply@github.com>2019-09-18 06:48:47 +0200
commitfed1709f46791c0b46b6460740d15f0f5b89d8d5 (patch)
tree161c05e5ebc90ad657484ee9c10991d963cabae0
parent99be5221bcb958dd8532ac34ba9166d8c784a341 (diff)
downloadrust-fed1709f46791c0b46b6460740d15f0f5b89d8d5.tar.gz
rust-fed1709f46791c0b46b6460740d15f0f5b89d8d5.zip
Add note about refactoring
Co-Authored-By: Philipp Krones <hello@philkrones.com>
-rw-r--r--clippy_lints/src/misc_early.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/clippy_lints/src/misc_early.rs b/clippy_lints/src/misc_early.rs
index d991d499764..acc83d28897 100644
--- a/clippy_lints/src/misc_early.rs
+++ b/clippy_lints/src/misc_early.rs
@@ -199,6 +199,10 @@ declare_clippy_lint! {
     /// **What it does:** Checks for tuple patterns with a wildcard
     /// pattern (`_`) is next to a rest pattern (`..`).
     ///
+    /// _NOTE_: While `_, ..` means there is at least one element left, `..`
+    /// means there are 0 or more elements left. This can make a difference
+    /// when refactoring, but shouldn't result in errors in the refactored code,
+    /// since the wildcard pattern isn't used anyway.
     /// **Why is this bad?** The wildcard pattern is unneeded as the rest pattern
     /// can match that element as well.
     ///