mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 14:38:46 +00:00
Add note about refactoring
Co-Authored-By: Philipp Krones <hello@philkrones.com>
This commit is contained in:
parent
99be5221bc
commit
fed1709f46
1 changed files with 4 additions and 0 deletions
|
@ -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.
|
||||
///
|
||||
|
|
Loading…
Add table
Reference in a new issue