matches: Remove extra comment
This commit is contained in:
parent
467a0bfdea
commit
a8fdf5ca8a
1 changed files with 0 additions and 16 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue