aboutsummaryrefslogtreecommitdiff
path: root/xtask/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-30 19:51:43 +0100
committerAleksey Kladov <[email protected]>2020-07-30 19:51:43 +0100
commit2e2642efccd5855e4158b01a006e7884a96982bb (patch)
treede4342a453b3b504178dd17c46fab3e1d6e995d2 /xtask/src
parentfbe60a2e284035d16c2a1ee743ee88db418689aa (diff)
Remove TypeAscriptionOwner
Diffstat (limited to 'xtask/src')
-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 =