diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-04-25 01:53:14 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-25 01:53:14 +0900 |
| commit | b566d0ae12aa53bfddfeafa61eaca3057a2c8ab2 (patch) | |
| tree | 40df7e730a829a6a9a4ff21a618b2bd559f8e148 /src/librustdoc/html | |
| parent | 46c517b7c43e332ef0a9bf9ff2ad6bd00eaefc80 (diff) | |
| parent | e29f46ce3761e7a3e8bf535bc55b7f8b58e4c0a7 (diff) | |
| download | rust-b566d0ae12aa53bfddfeafa61eaca3057a2c8ab2.tar.gz rust-b566d0ae12aa53bfddfeafa61eaca3057a2c8ab2.zip | |
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```
Diffstat (limited to 'src/librustdoc/html')
| -rw-r--r-- | src/librustdoc/html/render/print_item.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index 9d7d8a7cb8a..5865da9440b 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -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 " |
