]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/json/conversions.rs
Rollup merge of #84616 - GuillaumeGomez:fix-empty-dom-toggle, r=jsha
[rust.git] / src / librustdoc / json / conversions.rs
index 80ef0073da8a410f30745bdeed49c21e09b43f7c..2d8c347c3c1678575188ef24b404290670862e21 100644 (file)
@@ -40,7 +40,8 @@ pub(super) fn convert_item(&self, item: clean::Item) -> Option<Item> {
             .iter()
             .map(rustc_ast_pretty::pprust::attribute_to_string)
             .collect();
-        let clean::Item { span, name, attrs: _, kind: _, visibility, def_id } = item;
+        let span = item.span(self.tcx);
+        let clean::Item { name, attrs: _, kind: _, visibility, def_id, cfg: _ } = item;
         let inner = match *item.kind {
             clean::StrippedItem(_) => return None,
             _ => from_clean_item(item, self.tcx),
@@ -420,7 +421,7 @@ fn from_tcx(bare_decl: clean::BareFunctionDecl, tcx: TyCtxt<'_>) -> Self {
 
 impl FromWithTcx<clean::FnDecl> for FnDecl {
     fn from_tcx(decl: clean::FnDecl, tcx: TyCtxt<'_>) -> Self {
-        let clean::FnDecl { inputs, output, c_variadic, attrs: _ } = decl;
+        let clean::FnDecl { inputs, output, c_variadic } = decl;
         FnDecl {
             inputs: inputs
                 .values
@@ -462,6 +463,7 @@ fn from_tcx(impl_: clean::Impl, tcx: TyCtxt<'_>) -> Self {
             negative_polarity,
             synthetic,
             blanket_impl,
+            span: _span,
         } = impl_;
         Impl {
             is_unsafe: unsafety == rustc_hir::Unsafety::Unsafe,