diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-05-03 11:46:07 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-05-03 11:46:07 +0100 |
commit | baa35b02b2f1a197beec65bcd68f56ffb89abfa1 (patch) | |
tree | 5dc778bff97a6e7b0c29b1fb90abf3ee79a188dd /xtask/src | |
parent | 76c2f4ef49d8fe89c1199899f9fe6289ddd95b6b (diff) | |
parent | f90fbaf6a6ce9d41f712001e0f430e2ba0c4fbe6 (diff) |
Merge #4280
4280: Add documents owner for ImplDef and SourceFile r=matklad a=edwin0cheng
When working on #3182, I found that `ImplDef` and `SourceFile` do not implemet `DocCommentsOwer` trait, and I tested it in `cargo doc` that `impl` could has some doc-comments.
I am not so sure about `SourceFile` case, but in theory if that file is a crate root, the doc comment of it should represent the whole crate documentation, right ?
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'xtask/src')
-rw-r--r-- | xtask/src/ast_src.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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], |