Skip to content

Commit d7f75db

Browse files
committed
Reorder
1 parent 14cb96e commit d7f75db

File tree

3 files changed

+18
-19
lines changed

3 files changed

+18
-19
lines changed

crates/ra_hir_def/src/body/lower.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,6 @@ impl ExprCollector<'_> {
786786
ast::Pat::PlaceholderPat(_) => Pat::Wild,
787787
ast::Pat::RecordPat(p) => {
788788
let path = p.path().and_then(|path| self.expander.parse_path(path));
789-
790789
let args: Vec<_> = p
791790
.record_pat_field_list()
792791
.expect("every struct should have a field list")

crates/ra_syntax/src/ast/generated/nodes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,7 @@ pub struct BoxPat {
11281128
}
11291129
impl BoxPat {
11301130
pub fn box_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![box]) }
1131-
pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
1131+
pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
11321132
}
11331133
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
11341134
pub struct DotDotPat {

xtask/src/codegen/rust.ungram

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -516,8 +516,8 @@ Pat =
516516
LiteralPat =
517517
Literal
518518

519-
PathPat =
520-
Path
519+
BindPat =
520+
Attr* 'ref'? 'mut'? Name ('@' Pat)?
521521

522522
PlaceholderPat =
523523
'_'
@@ -540,29 +540,29 @@ RecordPatFieldList =
540540
RecordPatField =
541541
Attr* (NameRef ':')? Pat
542542

543-
OrPat =
544-
Pat*
543+
TupleStructPat =
544+
Path '(' args:(Pat (',' Pat)* ','?)? ')'
545+
546+
TuplePat =
547+
'(' args:(Pat (',' Pat)* ','?)? ')'
545548

546549
ParenPat =
547550
'(' Pat ')'
548551

549-
BoxPat =
550-
'box' Path
552+
SlicePat =
553+
'[' args:(Pat (',' Pat)* ','?)? ']'
551554

552-
BindPat =
553-
Attr* 'ref'? 'mut'? Name ('@' Pat)?
555+
PathPat =
556+
Path
557+
558+
OrPat =
559+
(Pat ('|' Pat)* '|'?)
560+
561+
BoxPat =
562+
'box' Pat
554563

555564
DotDotPat =
556565
'..'
557566

558-
SlicePat =
559-
'[' args:Pat* ']'
560-
561567
MacroPat =
562568
MacroCall
563-
564-
TupleStructPat =
565-
Path '(' args:Pat* ')'
566-
567-
TuplePat =
568-
'(' args:Pat* ')'

0 commit comments

Comments
 (0)