add 1 more test and dont trim other code

This commit is contained in:
lucarlig 2024-02-25 21:18:38 +04:00
parent 5a50cede29
commit f32e92cdc9
2 changed files with 4 additions and 3 deletions

View File

@ -17,7 +17,7 @@
use rustc_lint::{LateContext, LateLintPass};
use rustc_middle::hir::nested_filter;
use rustc_middle::lint::in_external_macro;
use rustc_middle::ty;
use rustc_middle::ty::{self};
use rustc_resolve::rustdoc::{
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
});
doc.pop();
let doc = doc.trim().to_string();
if doc.is_empty() {
if doc.trim().is_empty() {
return Some(DocInfo {
empty: true,
doc_headers: DocHeaders::default(),

View File

@ -59,3 +59,5 @@ fn warn() {
fn dont_warn() {
/*! dont warn me */
}
trait NoDoc {}