summaryrefslogtreecommitdiffstats
path: root/src/librustdoc/json
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
commitd1b2d29528b7794b41e66fc2136e395a02f8529b (patch)
treea4a17504b260206dec3cf55b2dca82929a348ac2 /src/librustdoc/json
parentReleasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz
rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/librustdoc/json')
-rw-r--r--src/librustdoc/json/conversions.rs9
-rw-r--r--src/librustdoc/json/mod.rs6
2 files changed, 10 insertions, 5 deletions
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<clean::GenericArg> for GenericArg {
}
impl FromWithTcx<clean::Constant> 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(())
}