mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-20 02:43:45 +00:00
fix bug in check_exprs
This commit is contained in:
parent
84219f45a3
commit
09c7c5d2c9
@ -533,10 +533,14 @@ fn check_attrs(cx: &LateContext<'_>, valid_idents: &FxHashSet<String>, attrs: &[
|
||||
suspicious_doc_comments::check(cx, attrs);
|
||||
|
||||
let (fragments, _) = attrs_to_doc_fragments(attrs.iter().map(|attr| (attr, None)), true);
|
||||
let mut doc = String::new();
|
||||
for fragment in &fragments {
|
||||
add_doc_fragment(&mut doc, fragment);
|
||||
}
|
||||
let mut doc = fragments
|
||||
.iter()
|
||||
.fold(String::new(), |mut acc, fragment| {
|
||||
add_doc_fragment(&mut acc, fragment);
|
||||
acc
|
||||
})
|
||||
.trim()
|
||||
.to_string();
|
||||
doc.pop();
|
||||
|
||||
if doc.is_empty() {
|
||||
|
Loading…
Reference in New Issue
Block a user