Add trait ast::TypeBoundsOwner

This commit is contained in:
Ville Penttinen 2019-03-31 10:56:48 +03:00
parent 245c0d8584
commit 55dcdb7d09
3 changed files with 21 additions and 5 deletions

View file

@ -295,7 +295,7 @@ Grammar(
"EnumVariantList": ( collections: [["variants", "EnumVariant"]] ),
"EnumVariant": ( traits: ["NameOwner", "DocCommentsOwner", "AttrsOwner"], options: ["Expr"] ),
"TraitDef": (
traits: ["VisibilityOwner", "NameOwner", "AttrsOwner", "DocCommentsOwner", "TypeParamsOwner"],
traits: ["VisibilityOwner", "NameOwner", "AttrsOwner", "DocCommentsOwner", "TypeParamsOwner", "TypeBoundsOwner"],
options: ["ItemList"]
),
"Module": (
@ -332,7 +332,8 @@ Grammar(
"NameOwner",
"TypeParamsOwner",
"AttrsOwner",
"DocCommentsOwner"
"DocCommentsOwner",
"TypeBoundsOwner",
],
options: ["TypeRef"]
),
@ -349,8 +350,12 @@ Grammar(
"PlaceholderType": (),
"FnPointerType": (options: ["ParamList", "RetType"]),
"ForType": (options: ["TypeRef"]),
"ImplTraitType": (),
"DynTraitType": (),
"ImplTraitType": (
traits: ["TypeBoundsOwner"],
),
"DynTraitType": (
traits: ["TypeBoundsOwner"],
),
"TypeRef": ( enum: [
"ParenType",
@ -573,7 +578,7 @@ Grammar(
["lifetime_params", "LifetimeParam" ],
]
),
"TypeParam": ( traits: ["NameOwner", "AttrsOwner"] ),
"TypeParam": ( traits: ["NameOwner", "AttrsOwner", "TypeBoundsOwner"] ),
"LifetimeParam": (
options: [ "Lifetime"],
traits: ["AttrsOwner"],