aboutsummaryrefslogtreecommitdiff
path: root/xtask
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-07-30 19:53:36 +0100
committerGitHub <[email protected]>2020-07-30 19:53:36 +0100
commit134d3c3c5068abc5ed3e03fe5df2b524ea70753d (patch)
treede4342a453b3b504178dd17c46fab3e1d6e995d2 /xtask
parent6f5b53013c54fa6d8429b717998cdb77a4d68b2c (diff)
parent2e2642efccd5855e4158b01a006e7884a96982bb (diff)
Merge #5612
5612: Remove TypeAscriptionOwner r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'xtask')
-rw-r--r--xtask/src/codegen/gen_syntax.rs1
-rw-r--r--xtask/src/codegen/rust.ungram16
2 files changed, 8 insertions, 9 deletions
diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs
index e993a750c..45b788bdb 100644
--- a/xtask/src/codegen/gen_syntax.rs
+++ b/xtask/src/codegen/gen_syntax.rs
@@ -660,7 +660,6 @@ fn extract_struct_traits(ast: &mut AstSrc) {
660 ("GenericParamsOwner", &["generic_param_list", "where_clause"]), 660 ("GenericParamsOwner", &["generic_param_list", "where_clause"]),
661 ("TypeBoundsOwner", &["type_bound_list", "colon_token"]), 661 ("TypeBoundsOwner", &["type_bound_list", "colon_token"]),
662 ("ModuleItemOwner", &["items"]), 662 ("ModuleItemOwner", &["items"]),
663 ("TypeAscriptionOwner", &["ascribed_type"]),
664 ("LoopBodyOwner", &["label", "loop_body"]), 663 ("LoopBodyOwner", &["label", "loop_body"]),
665 ("ArgListOwner", &["arg_list"]), 664 ("ArgListOwner", &["arg_list"]),
666 ]; 665 ];
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram
index 8c4f953b0..e09bc875a 100644
--- a/xtask/src/codegen/rust.ungram
+++ b/xtask/src/codegen/rust.ungram
@@ -61,13 +61,13 @@ ParamList =
61SelfParam = 61SelfParam =
62 Attr* ( 62 Attr* (
63 ('&' 'lifetime'?)? 'mut'? 'self' 63 ('&' 'lifetime'?)? 'mut'? 'self'
64 | 'mut'? 'self' ':' ascribed_type:TypeRef 64 | 'mut'? 'self' ':' ty:TypeRef
65 ) 65 )
66 66
67Param = 67Param =
68 Attr* ( 68 Attr* (
69 Pat (':' ascribed_type:TypeRef) 69 Pat (':' ty:TypeRef)
70 | ascribed_type:TypeRef 70 | ty:TypeRef
71 | '...' 71 | '...'
72 ) 72 )
73 73
@@ -88,7 +88,7 @@ RecordFieldList =
88 '{' fields:(RecordField (',' RecordField)* ','?)? '}' 88 '{' fields:(RecordField (',' RecordField)* ','?)? '}'
89 89
90RecordField = 90RecordField =
91 Attr* Visibility? Name ':' ascribed_type:TypeRef 91 Attr* Visibility? Name ':' ty:TypeRef
92 92
93TupleFieldList = 93TupleFieldList =
94 '(' fields:(TupleField (',' TupleField)* ','?)? ')' 94 '(' fields:(TupleField (',' TupleField)* ','?)? ')'
@@ -115,11 +115,11 @@ Union =
115 RecordFieldList 115 RecordFieldList
116 116
117Const = 117Const =
118 Attr* Visibility? 'default'? 'const' (Name | '_') ':' ascribed_type:TypeRef 118 Attr* Visibility? 'default'? 'const' (Name | '_') ':' ty:TypeRef
119 '=' body:Expr ';' 119 '=' body:Expr ';'
120 120
121Static = 121Static =
122 Attr* Visibility? 'static'? 'mut'? Name ':' ascribed_type:TypeRef 122 Attr* Visibility? 'static'? 'mut'? Name ':' ty:TypeRef
123 '=' body:Expr ';' 123 '=' body:Expr ';'
124 124
125Trait = 125Trait =
@@ -166,7 +166,7 @@ TypeParam =
166 ('=' default_type:TypeRef)? 166 ('=' default_type:TypeRef)?
167 167
168ConstParam = 168ConstParam =
169 Attr* 'const' Name ':' ascribed_type:TypeRef 169 Attr* 'const' Name ':' ty:TypeRef
170 ('=' default_val:Expr)? 170 ('=' default_val:Expr)?
171 171
172LifetimeParam = 172LifetimeParam =
@@ -439,7 +439,7 @@ ExprStmt =
439 Attr* Expr ';' 439 Attr* Expr ';'
440 440
441LetStmt = 441LetStmt =
442 Attr* 'let' Pat (':' ascribed_type:TypeRef) 442 Attr* 'let' Pat (':' ty:TypeRef)
443 '=' initializer:Expr ';' 443 '=' initializer:Expr ';'
444 444
445Path = 445Path =