add 1 more test and dont trim other code
This commit is contained in:
parent
5a50cede29
commit
f32e92cdc9
@ -17,7 +17,7 @@
|
|||||||
use rustc_lint::{LateContext, LateLintPass};
|
use rustc_lint::{LateContext, LateLintPass};
|
||||||
use rustc_middle::hir::nested_filter;
|
use rustc_middle::hir::nested_filter;
|
||||||
use rustc_middle::lint::in_external_macro;
|
use rustc_middle::lint::in_external_macro;
|
||||||
use rustc_middle::ty;
|
use rustc_middle::ty::{self};
|
||||||
use rustc_resolve::rustdoc::{
|
use rustc_resolve::rustdoc::{
|
||||||
add_doc_fragment, attrs_to_doc_fragments, main_body_opts, source_span_for_markdown_range, DocFragment,
|
add_doc_fragment, attrs_to_doc_fragments, main_body_opts, source_span_for_markdown_range, DocFragment,
|
||||||
};
|
};
|
||||||
@ -556,9 +556,8 @@ fn fake_broken_link_callback<'a>(_: BrokenLink<'_>) -> Option<(CowStr<'a>, CowSt
|
|||||||
acc
|
acc
|
||||||
});
|
});
|
||||||
doc.pop();
|
doc.pop();
|
||||||
let doc = doc.trim().to_string();
|
|
||||||
|
|
||||||
if doc.is_empty() {
|
if doc.trim().is_empty() {
|
||||||
return Some(DocInfo {
|
return Some(DocInfo {
|
||||||
empty: true,
|
empty: true,
|
||||||
doc_headers: DocHeaders::default(),
|
doc_headers: DocHeaders::default(),
|
||||||
|
@ -59,3 +59,5 @@ fn warn() {
|
|||||||
fn dont_warn() {
|
fn dont_warn() {
|
||||||
/*! dont warn me */
|
/*! dont warn me */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
trait NoDoc {}
|
||||||
|
Loading…
Reference in New Issue
Block a user