1
Fork 0

Remove collapsed field

`render/context` always runs after `run_global_context`, so it was always set to `true`.

This is a holdover from when rustdoc allowed configuring passes, but the `collapse-docs` pass was
removed ages ago, and the ability to configure passes is about to be removed.
This commit is contained in:
Joshua Nelson 2021-12-18 10:44:58 -06:00
parent d3f300477b
commit dea1c68614
5 changed files with 4 additions and 17 deletions

View file

@ -567,7 +567,7 @@ fn document_full_inner(
is_collapsible: bool,
heading_offset: HeadingOffset,
) {
if let Some(s) = cx.shared.maybe_collapsed_doc_value(item) {
if let Some(s) = item.collapsed_doc_value() {
debug!("Doc block: =====\n{}\n=====", s);
if is_collapsible {
w.write_str(
@ -1612,7 +1612,7 @@ fn render_impl(
write!(w, "</summary>")
}
if let Some(ref dox) = cx.shared.maybe_collapsed_doc_value(&i.impl_item) {
if let Some(ref dox) = i.impl_item.collapsed_doc_value() {
let mut ids = cx.id_map.borrow_mut();
write!(
w,