Skip to content

Commit 8250a25

Browse files
authored
Rollup merge of #82484 - bugadani:docfix, r=jyn514
rustdoc: Remove duplicate "List of all items" Closes #82477 r? `@jyn514`
2 parents 9a540cb + d3f75eb commit 8250a25

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/librustdoc/html/render/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,6 @@ impl AllTypes {
13431343
</a>\
13441344
</span>
13451345
</span>
1346-
<span class=\"in-band\">List of all items</span>\
13471346
</h1>",
13481347
);
13491348
// Note: print_entries does not escape the title, because we know the current set of titles

src/librustdoc/html/render/tests.rs

+11
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,14 @@ fn test_name_sorting() {
3838
sorted.sort_by(|&l, r| compare_names(l, r));
3939
assert_eq!(names, sorted);
4040
}
41+
42+
#[test]
43+
fn test_all_types_prints_header_once() {
44+
// Regression test for #82477
45+
let all_types = AllTypes::new();
46+
47+
let mut buffer = Buffer::new();
48+
all_types.print(&mut buffer);
49+
50+
assert_eq!(1, buffer.into_inner().matches("List of all items").count());
51+
}

0 commit comments

Comments
 (0)