diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-12-07 18:48:35 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-07 18:48:35 +0000 |
commit | 03b886de53834168dd52b5e504a649292f129ae6 (patch) | |
tree | 8aa5589eef906e67a55ae2737ca1a6f731793f39 /crates/syntax/src | |
parent | 8a950dfb406a927085602af016855cfe1988aee1 (diff) | |
parent | a1c8bdecfd408b7573357604f9c6543556f3f19a (diff) |
Merge #6719
6719: Use items can also have doc comments r=matklad a=Veykril
Prior to this change modules show more docs than they have cause they inherit the docs from documented use items inside of them.
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/syntax/src')
-rw-r--r-- | crates/syntax/src/ast/node_ext.rs | 1 | ||||
-rw-r--r-- | crates/syntax/src/parsing/text_tree_sink.rs | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/crates/syntax/src/ast/node_ext.rs b/crates/syntax/src/ast/node_ext.rs index b70b840b8..aa3a4b606 100644 --- a/crates/syntax/src/ast/node_ext.rs +++ b/crates/syntax/src/ast/node_ext.rs | |||
@@ -477,3 +477,4 @@ impl ast::DocCommentsOwner for ast::Const {} | |||
477 | impl ast::DocCommentsOwner for ast::TypeAlias {} | 477 | impl ast::DocCommentsOwner for ast::TypeAlias {} |
478 | impl ast::DocCommentsOwner for ast::Impl {} | 478 | impl ast::DocCommentsOwner for ast::Impl {} |
479 | impl ast::DocCommentsOwner for ast::MacroCall {} | 479 | impl ast::DocCommentsOwner for ast::MacroCall {} |
480 | impl ast::DocCommentsOwner for ast::Use {} | ||
diff --git a/crates/syntax/src/parsing/text_tree_sink.rs b/crates/syntax/src/parsing/text_tree_sink.rs index 997bc5d28..49842177a 100644 --- a/crates/syntax/src/parsing/text_tree_sink.rs +++ b/crates/syntax/src/parsing/text_tree_sink.rs | |||
@@ -148,7 +148,7 @@ fn n_attached_trivias<'a>( | |||
148 | ) -> usize { | 148 | ) -> usize { |
149 | match kind { | 149 | match kind { |
150 | MACRO_CALL | CONST | TYPE_ALIAS | STRUCT | ENUM | VARIANT | FN | TRAIT | MODULE | 150 | MACRO_CALL | CONST | TYPE_ALIAS | STRUCT | ENUM | VARIANT | FN | TRAIT | MODULE |
151 | | RECORD_FIELD | STATIC => { | 151 | | RECORD_FIELD | STATIC | USE => { |
152 | let mut res = 0; | 152 | let mut res = 0; |
153 | let mut trivias = trivias.enumerate().peekable(); | 153 | let mut trivias = trivias.enumerate().peekable(); |
154 | 154 | ||