Rollup merge of #84460 - jyn514:doctree-is-crate, r=camelid
rustdoc: Remove unnecessary `is_crate` field from doctree::Module and clean::Module It can be calculated on-demand even without a TyCtxt. This also changed `json::conversions::from_item_kind` to take a whole item, which avoids having to add more and more parameters. Helps with https://github.com/rust-lang/rust/issues/76382. r? ```@camelid```
This commit is contained in:
commit
b566d0ae12
8 changed files with 26 additions and 42 deletions
|
|
@ -28,8 +28,8 @@ pub(super) fn print_item(cx: &Context<'_>, item: &clean::Item, buf: &mut Buffer)
|
|||
// Write the breadcrumb trail header for the top
|
||||
buf.write_str("<h1 class=\"fqn\"><span class=\"in-band\">");
|
||||
let name = match *item.kind {
|
||||
clean::ModuleItem(ref m) => {
|
||||
if m.is_crate {
|
||||
clean::ModuleItem(_) => {
|
||||
if item.is_crate() {
|
||||
"Crate "
|
||||
} else {
|
||||
"Module "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue