mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
skip_while_next
This commit is contained in:
parent
355c9444e1
commit
386d438e17
2 changed files with 1 additions and 3 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue