Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--Cargo.toml1
-rw-r--r--crates/ide-completion/src/context/analysis.rs3
2 files changed, 1 insertions, 3 deletions
diff --git a/Cargo.toml b/Cargo.toml
index d5f9740c6d..099ac296e4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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"
diff --git a/crates/ide-completion/src/context/analysis.rs b/crates/ide-completion/src/context/analysis.rs
index 65ecaf6bac..c06b64df1c 100644
--- a/crates/ide-completion/src/context/analysis.rs
+++ b/crates/ide-completion/src/context/analysis.rs
@@ -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 {