diff options
| author | Georgy Komarov <jubnzv@gmail.com> | 2022-01-26 19:09:31 +0300 |
|---|---|---|
| committer | Georgy Komarov <jubnzv@gmail.com> | 2022-01-26 19:50:27 +0300 |
| commit | a8fdf5ca8aab08ba56678a4bce36f9da5ae8e52d (patch) | |
| tree | 01c3a7b8598480bb4fc337eea4fa890eb93eb5e1 | |
| parent | 467a0bfdea3ba03de05b90a3de85d4467a28762e (diff) | |
| download | rust-a8fdf5ca8aab08ba56678a4bce36f9da5ae8e52d.tar.gz rust-a8fdf5ca8aab08ba56678a4bce36f9da5ae8e52d.zip | |
matches: Remove extra comment
| -rw-r--r-- | clippy_lints/src/matches.rs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/clippy_lints/src/matches.rs b/clippy_lints/src/matches.rs index 47c02e22821..ab030ffb406 100644 --- a/clippy_lints/src/matches.rs +++ b/clippy_lints/src/matches.rs @@ -916,22 +916,6 @@ fn contains_only_wilds(pat: &Pat<'_>) -> bool { /// Returns true if the given patterns forms only exhaustive matches that don't contain enum /// patterns without a wildcard. -/// -/// For example: -/// -/// ``` -/// // Returns false, because the first arm contain enum without a wildcard. -/// match x { -/// (Some(E::V), _) => todo!(), -/// (None, _) => {} -/// } -/// -/// // Returns true, because the both arms form exhaustive matches and without enum variants. -/// match x { -/// (Some(_), _) => todo!(), -/// (None, _) => {} -/// } -/// ``` fn form_exhaustive_matches(left: &Pat<'_>, right: &Pat<'_>) -> bool { match (&left.kind, &right.kind) { (PatKind::Wild, _) | (_, PatKind::Wild) => true, |
