Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc: Remove duplicate "List of all items" #82484

Merged
merged 2 commits into from
Feb 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,6 @@ impl AllTypes {
</a>\
</span>
</span>
<span class=\"in-band\">List of all items</span>\
</h1>",
);
// Note: print_entries does not escape the title, because we know the current set of titles
Expand Down
11 changes: 11 additions & 0 deletions src/librustdoc/html/render/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,14 @@ fn test_name_sorting() {
sorted.sort_by(|&l, r| compare_names(l, r));
assert_eq!(names, sorted);
}

#[test]
fn test_all_types_prints_header_once() {
// Regression test for #82477
let all_types = AllTypes::new();

let mut buffer = Buffer::new();
all_types.print(&mut buffer);

assert_eq!(1, buffer.into_inner().matches("List of all items").count());
}