Skip to content
Closed
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
8 changes: 8 additions & 0 deletions src/librustdoc/html/render/print_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1570,6 +1570,14 @@ fn document_type_layout(w: &mut Buffer, cx: &Context<'_>, ty_def_id: DefId) {
pl = if bytes == 1 { "" } else { "s" },
);
}
writeln!(
w,
"<details class=\"rustdoc-toggle\">\
<summary>Full debug layout</summary>\
<pre><code>{:#?}</code></pre>\
</details>",
ty_layout.layout,
);
}
// This kind of layout error can occur with valid code, e.g. if you try to
// get the layout of a generic type such as `Vec<T>`.
Expand Down