aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_hir_def/src/body/lower.rs1
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs2
-rw-r--r--xtask/src/codegen/rust.ungram34
3 files changed, 18 insertions, 19 deletions
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs
index 25e29b7cd..ef1c0df01 100644
--- a/crates/ra_hir_def/src/body/lower.rs
+++ b/crates/ra_hir_def/src/body/lower.rs
@@ -786,7 +786,6 @@ impl ExprCollector<'_> {
786 ast::Pat::PlaceholderPat(_) => Pat::Wild, 786 ast::Pat::PlaceholderPat(_) => Pat::Wild,
787 ast::Pat::RecordPat(p) => { 787 ast::Pat::RecordPat(p) => {
788 let path = p.path().and_then(|path| self.expander.parse_path(path)); 788 let path = p.path().and_then(|path| self.expander.parse_path(path));
789
790 let args: Vec<_> = p 789 let args: Vec<_> = p
791 .record_pat_field_list() 790 .record_pat_field_list()
792 .expect("every struct should have a field list") 791 .expect("every struct should have a field list")
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index 7708ae806..713aebcfa 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -1128,7 +1128,7 @@ pub struct BoxPat {
1128} 1128}
1129impl BoxPat { 1129impl BoxPat {
1130 pub fn box_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![box]) } 1130 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) }
1132} 1132}
1133#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1133#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1134pub struct DotDotPat { 1134pub struct DotDotPat {
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram
index 643668863..cb8a307fe 100644
--- a/xtask/src/codegen/rust.ungram
+++ b/xtask/src/codegen/rust.ungram
@@ -516,8 +516,8 @@ Pat =
516LiteralPat = 516LiteralPat =
517 Literal 517 Literal
518 518
519PathPat = 519BindPat =
520 Path 520 Attr* 'ref'? 'mut'? Name ('@' Pat)?
521 521
522PlaceholderPat = 522PlaceholderPat =
523 '_' 523 '_'
@@ -540,29 +540,29 @@ RecordPatFieldList =
540RecordPatField = 540RecordPatField =
541 Attr* (NameRef ':')? Pat 541 Attr* (NameRef ':')? Pat
542 542
543OrPat = 543TupleStructPat =
544 Pat* 544 Path '(' args:(Pat (',' Pat)* ','?)? ')'
545
546TuplePat =
547 '(' args:(Pat (',' Pat)* ','?)? ')'
545 548
546ParenPat = 549ParenPat =
547 '(' Pat ')' 550 '(' Pat ')'
548 551
549BoxPat = 552SlicePat =
550 'box' Path 553 '[' args:(Pat (',' Pat)* ','?)? ']'
551 554
552BindPat = 555PathPat =
553 Attr* 'ref'? 'mut'? Name ('@' Pat)? 556 Path
557
558OrPat =
559 (Pat ('|' Pat)* '|'?)
560
561BoxPat =
562 'box' Pat
554 563
555DotDotPat = 564DotDotPat =
556 '..' 565 '..'
557 566
558SlicePat =
559 '[' args:Pat* ']'
560
561MacroPat = 567MacroPat =
562 MacroCall 568 MacroCall
563
564TupleStructPat =
565 Path '(' args:Pat* ')'
566
567TuplePat =
568 '(' args:Pat* ')'