diff options
| author | bors <bors@rust-lang.org> | 2022-12-03 05:24:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-12-03 05:24:35 +0000 |
| commit | 24f2704e96c9d3a4f887d2d0a7d79ecffd79bd65 (patch) | |
| tree | 1488e15adc00715025273fac5f332f3a7c3c0aae /src/librustdoc | |
| parent | dd7a12593a5274dd812a7b8ab91a4ff29adb81a2 (diff) | |
| parent | d8f6cc3b63a84095d9fccd605b53851c5f12219e (diff) | |
| download | rust-24f2704e96c9d3a4f887d2d0a7d79ecffd79bd65.tar.gz rust-24f2704e96c9d3a4f887d2d0a7d79ecffd79bd65.zip | |
Auto merge of #105196 - JohnTitor:rollup-8rxqnq6, r=JohnTitor
Rollup of 7 pull requests Successful merges: - #104903 (Use ocx.normalize in report_projection_error) - #105032 (improve doc of into_boxed_slice and impl From<Vec<T>> for Box<[T]>) - #105100 (Add missing intra-doc link) - #105181 (Don't add a note for implementing a trait if its inner type is erroneous) - #105182 (Rustdoc-Json: Don't inline foreign traits) - #105188 (Don't elide type information when printing E0308 with `-Zverbose`) - #105189 (rustdoc: clean up redundant CSS on `.rustdoc-toggle.hideme`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/librustdoc')
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 10 | ||||
| -rw-r--r-- | src/librustdoc/json/mod.rs | 53 |
2 files changed, 3 insertions, 60 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index e9f2e025774..f44797fe55f 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -1585,17 +1585,11 @@ details.rustdoc-toggle[open] > summary.hideme > span { display: none; } -details.rustdoc-toggle[open] > summary::before, -details.rustdoc-toggle[open] > summary.hideme::before { +details.rustdoc-toggle[open] > summary::before { background: url("toggle-minus-31bbd6e4c77f5c96.svg") no-repeat top left; - width: 16px; - height: 16px; - display: inline-block; - content: ""; } -details.rustdoc-toggle[open] > summary::after, -details.rustdoc-toggle[open] > summary.hideme::after { +details.rustdoc-toggle[open] > summary::after { content: "Collapse"; } diff --git a/src/librustdoc/json/mod.rs b/src/librustdoc/json/mod.rs index 83be1a16eb2..1196f944faa 100644 --- a/src/librustdoc/json/mod.rs +++ b/src/librustdoc/json/mod.rs @@ -99,53 +99,6 @@ impl<'tcx> JsonRenderer<'tcx> { }) .unwrap_or_default() } - - fn get_trait_items(&mut self) -> Vec<(types::Id, types::Item)> { - debug!("Adding foreign trait items"); - Rc::clone(&self.cache) - .traits - .iter() - .filter_map(|(&id, trait_item)| { - // only need to synthesize items for external traits - if !id.is_local() { - for item in &trait_item.items { - trace!("Adding subitem to {id:?}: {:?}", item.item_id); - self.item(item.clone()).unwrap(); - } - let item_id = from_item_id(id.into(), self.tcx); - Some(( - item_id.clone(), - types::Item { - id: item_id, - crate_id: id.krate.as_u32(), - name: self - .cache - .paths - .get(&id) - .unwrap_or_else(|| { - self.cache - .external_paths - .get(&id) - .expect("Trait should either be in local or external paths") - }) - .0 - .last() - .map(|s| s.to_string()), - visibility: types::Visibility::Public, - inner: types::ItemEnum::Trait(trait_item.clone().into_tcx(self.tcx)), - span: None, - docs: Default::default(), - links: Default::default(), - attrs: Default::default(), - deprecation: Default::default(), - }, - )) - } else { - None - } - }) - .collect() - } } impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> { @@ -276,11 +229,7 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> { let e = ExternalCrate { crate_num: LOCAL_CRATE }; - // FIXME(adotinthevoid): Remove this, as it's not consistent with not - // inlining foreign items. - let foreign_trait_items = self.get_trait_items(); - let mut index = (*self.index).clone().into_inner(); - index.extend(foreign_trait_items); + let index = (*self.index).clone().into_inner(); debug!("Constructing Output"); // This needs to be the default HashMap for compatibility with the public interface for |
