From a1c8bdecfd408b7573357604f9c6543556f3f19a Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Fri, 4 Dec 2020 15:51:23 +0100 Subject: Use items can also have doc comments --- crates/syntax/src/ast/node_ext.rs | 1 + crates/syntax/src/parsing/text_tree_sink.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/syntax/src') 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 {} impl ast::DocCommentsOwner for ast::TypeAlias {} impl ast::DocCommentsOwner for ast::Impl {} impl ast::DocCommentsOwner for ast::MacroCall {} +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>( ) -> 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(); -- cgit v1.2.3