Skip to content

Commit 3340666

Browse files
authored
Rollup merge of rust-lang#92081 - jyn514:need-backline, r=GuillaumeGomez
rustdoc: Remove unnecessary `need_backline` function r? `@GuillaumeGomez`
2 parents 1f080f6 + 1f1f721 commit 3340666

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Diff for: src/librustdoc/clean/types.rs

+3-7
Original file line numberDiff line numberDiff line change
@@ -1029,12 +1029,6 @@ impl Attributes {
10291029
) -> Attributes {
10301030
let mut doc_strings: Vec<DocFragment> = vec![];
10311031

1032-
fn update_need_backline(doc_strings: &mut Vec<DocFragment>) {
1033-
if let Some(prev) = doc_strings.last_mut() {
1034-
prev.need_backline = true;
1035-
}
1036-
}
1037-
10381032
let clean_attr = |(attr, parent_module): (&ast::Attribute, Option<DefId>)| {
10391033
if let Some(value) = attr.doc_str() {
10401034
trace!("got doc_str={:?}", value);
@@ -1054,7 +1048,9 @@ impl Attributes {
10541048
indent: 0,
10551049
};
10561050

1057-
update_need_backline(&mut doc_strings);
1051+
if let Some(prev) = doc_strings.last_mut() {
1052+
prev.need_backline = true;
1053+
}
10581054

10591055
doc_strings.push(frag);
10601056

0 commit comments

Comments
 (0)