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 <lukastw97@gmail.com>
This commit is contained in:
@@ -477,3 +477,4 @@ impl ast::DocCommentsOwner for ast::Const {}
|
||||
impl ast::DocCommentsOwner for ast::TypeAlias {}
|
||||
impl ast::DocCommentsOwner for ast::Impl {}
|
||||
impl ast::DocCommentsOwner for ast::MacroCall {}
|
||||
impl ast::DocCommentsOwner for ast::Use {}
|
||||
|
||||
@@ -148,7 +148,7 @@ fn n_attached_trivias<'a>(
|
||||
) -> usize {
|
||||
match kind {
|
||||
MACRO_CALL | CONST | TYPE_ALIAS | STRUCT | ENUM | VARIANT | FN | TRAIT | MODULE
|
||||
| RECORD_FIELD | STATIC => {
|
||||
| RECORD_FIELD | STATIC | USE => {
|
||||
let mut res = 0;
|
||||
let mut trivias = trivias.enumerate().peekable();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user