skip_while_next

This commit is contained in:
Johann Hemmann 2024-01-22 00:42:46 +01:00
parent 355c9444e1
commit 386d438e17
2 changed files with 1 additions and 3 deletions

View file

@ -179,7 +179,6 @@ new_without_default = "allow"
non_canonical_clone_impl = "allow"
non_canonical_partial_ord_impl = "allow"
self_named_constructors = "allow"
skip_while_next = "allow"
too_many_arguments = "allow"
toplevel_ref_arg = "allow"
type_complexity = "allow"

View file

@ -1267,8 +1267,7 @@ fn pattern_context_for(
pat
.syntax()
.ancestors()
.skip_while(|it| ast::Pat::can_cast(it.kind()))
.next()
.find(|it| !ast::Pat::can_cast(it.kind()))
.map_or((PatternRefutability::Irrefutable, false), |node| {
let refutability = match_ast! {
match node {