Use items can also have doc comments

This commit is contained in:
Lukas Wirth 2020-12-04 15:51:23 +01:00
parent a3043cf53f
commit a1c8bdecfd
5 changed files with 23 additions and 23 deletions

View file

@ -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 {}

View file

@ -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();