From d1b2d29528b7794b41e66fc2136e395a02f8529b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:59:35 +0200 Subject: Merging upstream version 1.73.0+dfsg1. Signed-off-by: Daniel Baumann --- src/librustdoc/json/conversions.rs | 9 +++++++-- src/librustdoc/json/mod.rs | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'src/librustdoc/json') diff --git a/src/librustdoc/json/conversions.rs b/src/librustdoc/json/conversions.rs index 91cd55b11..8673138f6 100644 --- a/src/librustdoc/json/conversions.rs +++ b/src/librustdoc/json/conversions.rs @@ -171,6 +171,7 @@ impl FromWithTcx for GenericArg { } impl FromWithTcx for Constant { + // FIXME(generic_const_items): Add support for generic const items. fn from_tcx(constant: clean::Constant, tcx: TyCtxt<'_>) -> Self { let expr = constant.expr(tcx); let value = constant.value(tcx); @@ -321,8 +322,12 @@ fn from_clean_item(item: clean::Item, tcx: TyCtxt<'_>) -> ItemEnum { impls: Vec::new(), // Added in JsonRenderer::item }) } - TyAssocConstItem(ty) => ItemEnum::AssocConst { type_: ty.into_tcx(tcx), default: None }, - AssocConstItem(ty, default) => { + // FIXME(generic_const_items): Add support for generic associated consts. + TyAssocConstItem(_generics, ty) => { + ItemEnum::AssocConst { type_: ty.into_tcx(tcx), default: None } + } + // FIXME(generic_const_items): Add support for generic associated consts. + AssocConstItem(_generics, ty, default) => { ItemEnum::AssocConst { type_: ty.into_tcx(tcx), default: Some(default.expr(tcx)) } } TyAssocTypeItem(g, b) => ItemEnum::AssocType { diff --git a/src/librustdoc/json/mod.rs b/src/librustdoc/json/mod.rs index 9392dd4d0..cd791ce00 100644 --- a/src/librustdoc/json/mod.rs +++ b/src/librustdoc/json/mod.rs @@ -139,7 +139,7 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> { fn item(&mut self, item: clean::Item) -> Result<(), Error> { let item_type = item.type_(); let item_name = item.name; - trace!("rendering {} {:?}", item_type, item_name); + trace!("rendering {item_type} {item_name:?}"); // Flatten items that recursively store other items. We include orphaned items from // stripped modules and etc that are otherwise reachable. @@ -203,11 +203,11 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> { if !can_be_ignored { assert_eq!(old_item, new_item); } - trace!("replaced {:?}\nwith {:?}", old_item, new_item); + trace!("replaced {old_item:?}\nwith {new_item:?}"); } } - trace!("done rendering {} {:?}", item_type, item_name); + trace!("done rendering {item_type} {item_name:?}"); Ok(()) } -- cgit v1.2.3