diff options
author | Edwin Cheng <[email protected]> | 2020-05-03 11:00:27 +0100 |
---|---|---|
committer | Edwin Cheng <[email protected]> | 2020-05-03 11:00:27 +0100 |
commit | f90fbaf6a6ce9d41f712001e0f430e2ba0c4fbe6 (patch) | |
tree | b02f7946d5eedf747f96dce6aaa5bcfe3cd7f3c1 | |
parent | 2474f42ae95bffea7c0bc713f92322bfec4d59a7 (diff) |
Add documents owner for ImplDef and SourceFile
-rw-r--r-- | crates/ra_syntax/src/ast/generated/nodes.rs | 2 | ||||
-rw-r--r-- | xtask/src/ast_src.rs | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 5e844d5ae..c2cc25958 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs | |||
@@ -12,6 +12,7 @@ pub struct SourceFile { | |||
12 | } | 12 | } |
13 | impl ast::ModuleItemOwner for SourceFile {} | 13 | impl ast::ModuleItemOwner for SourceFile {} |
14 | impl ast::AttrsOwner for SourceFile {} | 14 | impl ast::AttrsOwner for SourceFile {} |
15 | impl ast::DocCommentsOwner for SourceFile {} | ||
15 | impl SourceFile { | 16 | impl SourceFile { |
16 | pub fn modules(&self) -> AstChildren<Module> { support::children(&self.syntax) } | 17 | pub fn modules(&self) -> AstChildren<Module> { support::children(&self.syntax) } |
17 | } | 18 | } |
@@ -259,6 +260,7 @@ pub struct ImplDef { | |||
259 | } | 260 | } |
260 | impl ast::TypeParamsOwner for ImplDef {} | 261 | impl ast::TypeParamsOwner for ImplDef {} |
261 | impl ast::AttrsOwner for ImplDef {} | 262 | impl ast::AttrsOwner for ImplDef {} |
263 | impl ast::DocCommentsOwner for ImplDef {} | ||
262 | impl ImplDef { | 264 | impl ImplDef { |
263 | pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) } | 265 | pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) } |
264 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) } | 266 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) } |
diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs index 028f7cbe1..2f8065b73 100644 --- a/xtask/src/ast_src.rs +++ b/xtask/src/ast_src.rs | |||
@@ -305,7 +305,7 @@ macro_rules! ast_enums { | |||
305 | pub(crate) const AST_SRC: AstSrc = AstSrc { | 305 | pub(crate) const AST_SRC: AstSrc = AstSrc { |
306 | tokens: &["Whitespace", "Comment", "String", "RawString"], | 306 | tokens: &["Whitespace", "Comment", "String", "RawString"], |
307 | nodes: &ast_nodes! { | 307 | nodes: &ast_nodes! { |
308 | struct SourceFile: ModuleItemOwner, AttrsOwner { | 308 | struct SourceFile: ModuleItemOwner, AttrsOwner, DocCommentsOwner { |
309 | modules: [Module], | 309 | modules: [Module], |
310 | } | 310 | } |
311 | 311 | ||
@@ -401,7 +401,7 @@ pub(crate) const AST_SRC: AstSrc = AstSrc { | |||
401 | T![;] | 401 | T![;] |
402 | } | 402 | } |
403 | 403 | ||
404 | struct ImplDef: TypeParamsOwner, AttrsOwner { | 404 | struct ImplDef: TypeParamsOwner, AttrsOwner, DocCommentsOwner { |
405 | T![default], | 405 | T![default], |
406 | T![const], | 406 | T![const], |
407 | T![unsafe], | 407 | T![unsafe], |