From 28ef4c375a9f56d69daf885504aea3df7012bb81 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 15:36:21 +0200 Subject: Rename TypeParamList -> GenericParamList --- xtask/src/ast_src.rs | 2 +- xtask/src/codegen/gen_syntax.rs | 2 +- xtask/src/codegen/rust.ungram | 20 ++++++++++---------- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'xtask/src') diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs index e66e96d64..b81985851 100644 --- a/xtask/src/ast_src.rs +++ b/xtask/src/ast_src.rs @@ -203,7 +203,7 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc { "NAME_REF", "LET_STMT", "EXPR_STMT", - "TYPE_PARAM_LIST", + "GENERIC_PARAM_LIST", "LIFETIME_PARAM", "TYPE_PARAM", "CONST_PARAM", diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs index 072527208..f79cd972e 100644 --- a/xtask/src/codegen/gen_syntax.rs +++ b/xtask/src/codegen/gen_syntax.rs @@ -667,7 +667,7 @@ fn extract_struct_traits(ast: &mut AstSrc) { ("AttrsOwner", &["attrs"]), ("NameOwner", &["name"]), ("VisibilityOwner", &["visibility"]), - ("TypeParamsOwner", &["type_param_list", "where_clause"]), + ("GenericParamsOwner", &["generic_param_list", "where_clause"]), ("TypeBoundsOwner", &["type_bound_list", "colon_token"]), ("ModuleItemOwner", &["items"]), ("TypeAscriptionOwner", &["ascribed_type"]), diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index 760a8dd95..833ffd9e0 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram @@ -45,7 +45,7 @@ UseTreeList = Fn = Attr* Visibility? 'default'? ('async' | 'const')? 'unsafe'? Abi? - 'fn' Name TypeParamList? ParamList RetType? + 'fn' Name GenericParamList? ParamList RetType? WhereClause? (body:BlockExpr | ';') @@ -73,17 +73,17 @@ RetType = '->' TypeRef TypeAlias = - Attr* Visibility? 'default'? 'type' Name TypeParamList? (':' TypeBoundList?)? WhereClause? + Attr* Visibility? 'default'? 'type' Name GenericParamList? (':' TypeBoundList?)? WhereClause? '=' TypeRef ';' StructDef = - Attr* Visibility? 'struct' Name TypeParamList? ( + Attr* Visibility? 'struct' Name GenericParamList? ( WhereClause? (RecordFieldDefList | ';') | TupleFieldDefList WhereClause? ';' ) UnionDef = - Attr* Visibility? 'union' Name TypeParamList? WhereClause? + Attr* Visibility? 'union' Name GenericParamList? WhereClause? RecordFieldDefList RecordFieldDefList = @@ -103,7 +103,7 @@ FieldDefList = | TupleFieldDefList EnumDef = - Attr* Visibility? 'enum' Name TypeParamList? WhereClause? + Attr* Visibility? 'enum' Name GenericParamList? WhereClause? variant_list:EnumVariantList EnumVariantList = @@ -113,7 +113,7 @@ EnumVariant = Attr* Visibility? Name FieldDefList ('=' Expr)? TraitDef = - Attr* Visibility? 'unsafe'? 'auto'? 'trait' Name TypeParamList + Attr* Visibility? 'unsafe'? 'auto'? 'trait' Name GenericParamList (':' TypeBoundList?)? WhereClause AssocItemList @@ -129,7 +129,7 @@ StaticDef = '=' body:Expr ';' ImplDef = - Attr* Visibility? 'const'? 'default'? 'unsafe'? 'impl' TypeParamList? '!'? 'for' + Attr* Visibility? 'const'? 'default'? 'unsafe'? 'impl' GenericParamList? '!'? 'for' WhereClause? AssocItemList @@ -164,7 +164,7 @@ FnPointerType = Abi 'unsafe'? 'fn' ParamList RetType? ForType = - 'for' TypeParamList TypeRef + 'for' GenericParamList TypeRef ImplTraitType = 'impl' TypeBoundList @@ -379,7 +379,7 @@ MacroStmts = Attr = '#' '!'? '[' Path ('=' input:AttrInput)? ']' -TypeParamList = +GenericParamList = '<' TypeParam* LifetimeParam* @@ -404,7 +404,7 @@ TypeBoundList = bounds:TypeBound* WherePred = - ('for' TypeParamList)? ('lifetime' | TypeRef) ':' TypeBoundList + ('for' GenericParamList)? ('lifetime' | TypeRef) ':' TypeBoundList WhereClause = 'where' predicates:WherePred* -- cgit v1.2.3