mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Add additional pattern variants
This commit is contained in:
parent
0a82d9cdc9
commit
afaa26636e
7 changed files with 142 additions and 62 deletions
|
@ -2285,7 +2285,11 @@ impl AstNode for PathPat {
|
|||
}
|
||||
|
||||
|
||||
impl PathPat {}
|
||||
impl PathPat {
|
||||
pub fn path(&self) -> Option<&Path> {
|
||||
super::child_opt(self)
|
||||
}
|
||||
}
|
||||
|
||||
// PathSegment
|
||||
#[derive(Debug, PartialEq, Eq, Hash)]
|
||||
|
@ -3219,7 +3223,11 @@ impl AstNode for TuplePat {
|
|||
}
|
||||
|
||||
|
||||
impl TuplePat {}
|
||||
impl TuplePat {
|
||||
pub fn args(&self) -> impl Iterator<Item = &Pat> {
|
||||
super::children(self)
|
||||
}
|
||||
}
|
||||
|
||||
// TupleStructPat
|
||||
#[derive(Debug, PartialEq, Eq, Hash)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue