Skip to content

Commit fed1709

Browse files
mikeriteflip1995
andauthored
Add note about refactoring
Co-Authored-By: Philipp Krones <hello@philkrones.com>
1 parent 99be522 commit fed1709

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clippy_lints/src/misc_early.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,10 @@ declare_clippy_lint! {
199199
/// **What it does:** Checks for tuple patterns with a wildcard
200200
/// pattern (`_`) is next to a rest pattern (`..`).
201201
///
202+
/// _NOTE_: While `_, ..` means there is at least one element left, `..`
203+
/// means there are 0 or more elements left. This can make a difference
204+
/// when refactoring, but shouldn't result in errors in the refactored code,
205+
/// since the wildcard pattern isn't used anyway.
202206
/// **Why is this bad?** The wildcard pattern is unneeded as the rest pattern
203207
/// can match that element as well.
204208
///

0 commit comments

Comments
 (0)