Skip to content

Commit 9712267

Browse files
committed
Add some more DocCommentsOwner
1 parent 43665eb commit 9712267

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

crates/ra_syntax/src/ast/generated.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,7 @@ impl<'a> AstNode<'a> for ConstDef<'a> {
554554
impl<'a> ast::NameOwner<'a> for ConstDef<'a> {}
555555
impl<'a> ast::TypeParamsOwner<'a> for ConstDef<'a> {}
556556
impl<'a> ast::AttrsOwner<'a> for ConstDef<'a> {}
557+
impl<'a> ast::DocCommentsOwner<'a> for ConstDef<'a> {}
557558
impl<'a> ConstDef<'a> {}
558559

559560
// ContinueExpr
@@ -659,6 +660,7 @@ impl<'a> AstNode<'a> for EnumDef<'a> {
659660
impl<'a> ast::NameOwner<'a> for EnumDef<'a> {}
660661
impl<'a> ast::TypeParamsOwner<'a> for EnumDef<'a> {}
661662
impl<'a> ast::AttrsOwner<'a> for EnumDef<'a> {}
663+
impl<'a> ast::DocCommentsOwner<'a> for EnumDef<'a> {}
662664
impl<'a> EnumDef<'a> {}
663665

664666
// Expr
@@ -1761,6 +1763,7 @@ impl<'a> AstNode<'a> for Module<'a> {
17611763

17621764
impl<'a> ast::NameOwner<'a> for Module<'a> {}
17631765
impl<'a> ast::AttrsOwner<'a> for Module<'a> {}
1766+
impl<'a> ast::DocCommentsOwner<'a> for Module<'a> {}
17641767
impl<'a> Module<'a> {
17651768
pub fn item_list(self) -> Option<ItemList<'a>> {
17661769
super::child_opt(self)
@@ -3035,6 +3038,7 @@ impl<'a> AstNode<'a> for StaticDef<'a> {
30353038
impl<'a> ast::NameOwner<'a> for StaticDef<'a> {}
30363039
impl<'a> ast::TypeParamsOwner<'a> for StaticDef<'a> {}
30373040
impl<'a> ast::AttrsOwner<'a> for StaticDef<'a> {}
3041+
impl<'a> ast::DocCommentsOwner<'a> for StaticDef<'a> {}
30383042
impl<'a> StaticDef<'a> {}
30393043

30403044
// Stmt
@@ -3113,6 +3117,7 @@ impl<'a> AstNode<'a> for StructDef<'a> {
31133117
impl<'a> ast::NameOwner<'a> for StructDef<'a> {}
31143118
impl<'a> ast::TypeParamsOwner<'a> for StructDef<'a> {}
31153119
impl<'a> ast::AttrsOwner<'a> for StructDef<'a> {}
3120+
impl<'a> ast::DocCommentsOwner<'a> for StructDef<'a> {}
31163121
impl<'a> StructDef<'a> {
31173122
pub fn fields(self) -> impl Iterator<Item = NamedFieldDef<'a>> + 'a {
31183123
super::children(self)
@@ -3255,6 +3260,7 @@ impl<'a> AstNode<'a> for TraitDef<'a> {
32553260

32563261
impl<'a> ast::NameOwner<'a> for TraitDef<'a> {}
32573262
impl<'a> ast::AttrsOwner<'a> for TraitDef<'a> {}
3263+
impl<'a> ast::DocCommentsOwner<'a> for TraitDef<'a> {}
32583264
impl<'a> TraitDef<'a> {}
32593265

32603266
// TryExpr
@@ -3462,6 +3468,7 @@ impl<'a> AstNode<'a> for TypeDef<'a> {
34623468
impl<'a> ast::NameOwner<'a> for TypeDef<'a> {}
34633469
impl<'a> ast::TypeParamsOwner<'a> for TypeDef<'a> {}
34643470
impl<'a> ast::AttrsOwner<'a> for TypeDef<'a> {}
3471+
impl<'a> ast::DocCommentsOwner<'a> for TypeDef<'a> {}
34653472
impl<'a> TypeDef<'a> {}
34663473

34673474
// TypeParam

crates/ra_syntax/src/grammar.ron

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ Grammar(
260260
"NameOwner",
261261
"TypeParamsOwner",
262262
"AttrsOwner",
263+
"DocCommentsOwner"
263264
],
264265
collections: [
265266
["fields", "NamedFieldDef"]
@@ -270,10 +271,11 @@ Grammar(
270271
"NameOwner",
271272
"TypeParamsOwner",
272273
"AttrsOwner",
274+
"DocCommentsOwner"
273275
] ),
274-
"TraitDef": ( traits: ["NameOwner", "AttrsOwner"] ),
276+
"TraitDef": ( traits: ["NameOwner", "AttrsOwner", "DocCommentsOwner"] ),
275277
"Module": (
276-
traits: ["NameOwner", "AttrsOwner" ],
278+
traits: ["NameOwner", "AttrsOwner", "DocCommentsOwner" ],
277279
options: [ "ItemList" ]
278280
),
279281
"ItemList": (
@@ -283,16 +285,19 @@ Grammar(
283285
"NameOwner",
284286
"TypeParamsOwner",
285287
"AttrsOwner",
288+
"DocCommentsOwner"
286289
] ),
287290
"StaticDef": ( traits: [
288291
"NameOwner",
289292
"TypeParamsOwner",
290293
"AttrsOwner",
294+
"DocCommentsOwner"
291295
] ),
292296
"TypeDef": ( traits: [
293297
"NameOwner",
294298
"TypeParamsOwner",
295299
"AttrsOwner",
300+
"DocCommentsOwner"
296301
] ),
297302
"ImplItem": (),
298303

0 commit comments

Comments
 (0)