Trigger unused_doc_comments on macros at once

This commit is contained in:
Yuki Okushi 2021-04-04 02:39:55 +09:00
parent 836c317426
commit 81f00c98a6
4 changed files with 61 additions and 3 deletions

View file

@ -989,7 +989,7 @@ fn warn_if_doc(cx: &EarlyContext<'_>, node_span: Span, node_kind: &str, attrs: &
Some(sugared_span.map_or(attr.span, |span| span.with_hi(attr.span.hi())));
}
if attrs.peek().map(|next_attr| next_attr.is_doc_comment()).unwrap_or_default() {
if attrs.peek().map_or(false, |next_attr| next_attr.is_doc_comment()) {
continue;
}