mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 20:43:21 +00:00
Reorder
This commit is contained in:
parent
14cb96ec0e
commit
d7f75db90d
3 changed files with 18 additions and 19 deletions
|
@ -786,7 +786,6 @@ impl ExprCollector<'_> {
|
||||||
ast::Pat::PlaceholderPat(_) => Pat::Wild,
|
ast::Pat::PlaceholderPat(_) => Pat::Wild,
|
||||||
ast::Pat::RecordPat(p) => {
|
ast::Pat::RecordPat(p) => {
|
||||||
let path = p.path().and_then(|path| self.expander.parse_path(path));
|
let path = p.path().and_then(|path| self.expander.parse_path(path));
|
||||||
|
|
||||||
let args: Vec<_> = p
|
let args: Vec<_> = p
|
||||||
.record_pat_field_list()
|
.record_pat_field_list()
|
||||||
.expect("every struct should have a field list")
|
.expect("every struct should have a field list")
|
||||||
|
|
|
@ -1128,7 +1128,7 @@ pub struct BoxPat {
|
||||||
}
|
}
|
||||||
impl BoxPat {
|
impl BoxPat {
|
||||||
pub fn box_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![box]) }
|
pub fn box_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![box]) }
|
||||||
pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
|
pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
|
||||||
}
|
}
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||||
pub struct DotDotPat {
|
pub struct DotDotPat {
|
||||||
|
|
|
@ -516,8 +516,8 @@ Pat =
|
||||||
LiteralPat =
|
LiteralPat =
|
||||||
Literal
|
Literal
|
||||||
|
|
||||||
PathPat =
|
BindPat =
|
||||||
Path
|
Attr* 'ref'? 'mut'? Name ('@' Pat)?
|
||||||
|
|
||||||
PlaceholderPat =
|
PlaceholderPat =
|
||||||
'_'
|
'_'
|
||||||
|
@ -540,29 +540,29 @@ RecordPatFieldList =
|
||||||
RecordPatField =
|
RecordPatField =
|
||||||
Attr* (NameRef ':')? Pat
|
Attr* (NameRef ':')? Pat
|
||||||
|
|
||||||
OrPat =
|
TupleStructPat =
|
||||||
Pat*
|
Path '(' args:(Pat (',' Pat)* ','?)? ')'
|
||||||
|
|
||||||
|
TuplePat =
|
||||||
|
'(' args:(Pat (',' Pat)* ','?)? ')'
|
||||||
|
|
||||||
ParenPat =
|
ParenPat =
|
||||||
'(' Pat ')'
|
'(' Pat ')'
|
||||||
|
|
||||||
BoxPat =
|
SlicePat =
|
||||||
'box' Path
|
'[' args:(Pat (',' Pat)* ','?)? ']'
|
||||||
|
|
||||||
BindPat =
|
PathPat =
|
||||||
Attr* 'ref'? 'mut'? Name ('@' Pat)?
|
Path
|
||||||
|
|
||||||
|
OrPat =
|
||||||
|
(Pat ('|' Pat)* '|'?)
|
||||||
|
|
||||||
|
BoxPat =
|
||||||
|
'box' Pat
|
||||||
|
|
||||||
DotDotPat =
|
DotDotPat =
|
||||||
'..'
|
'..'
|
||||||
|
|
||||||
SlicePat =
|
|
||||||
'[' args:Pat* ']'
|
|
||||||
|
|
||||||
MacroPat =
|
MacroPat =
|
||||||
MacroCall
|
MacroCall
|
||||||
|
|
||||||
TupleStructPat =
|
|
||||||
Path '(' args:Pat* ')'
|
|
||||||
|
|
||||||
TuplePat =
|
|
||||||
'(' args:Pat* ')'
|
|
||||||
|
|
Loading…
Reference in a new issue