diff options
Diffstat (limited to '')
-rw-r--r-- | src/librustdoc/json/conversions.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/librustdoc/json/conversions.rs b/src/librustdoc/json/conversions.rs index 49a31f5f1..cdf59cdd3 100644 --- a/src/librustdoc/json/conversions.rs +++ b/src/librustdoc/json/conversions.rs @@ -272,7 +272,12 @@ fn from_clean_item(item: clean::Item, tcx: TyCtxt<'_>) -> ItemEnum { ConstantItem(c) => ItemEnum::Constant(c.into_tcx(tcx)), MacroItem(m) => ItemEnum::Macro(m.source), ProcMacroItem(m) => ItemEnum::ProcMacro(m.into_tcx(tcx)), - PrimitiveItem(p) => ItemEnum::PrimitiveType(p.as_sym().to_string()), + PrimitiveItem(p) => { + ItemEnum::Primitive(Primitive { + name: p.as_sym().to_string(), + impls: Vec::new(), // Added in JsonRenderer::item + }) + } TyAssocConstItem(ty) => ItemEnum::AssocConst { type_: ty.into_tcx(tcx), default: None }, AssocConstItem(ty, default) => { ItemEnum::AssocConst { type_: ty.into_tcx(tcx), default: Some(default.expr(tcx)) } @@ -427,8 +432,9 @@ impl FromWithTcx<clean::WherePredicate> for WherePredicate { lifetime: convert_lifetime(lifetime), bounds: bounds.into_tcx(tcx), }, - EqPredicate { lhs, rhs } => { - WherePredicate::EqPredicate { lhs: lhs.into_tcx(tcx), rhs: rhs.into_tcx(tcx) } + // FIXME(fmease): Convert bound parameters as well. + EqPredicate { lhs, rhs, bound_params: _ } => { + WherePredicate::EqPredicate { lhs: (*lhs).into_tcx(tcx), rhs: (*rhs).into_tcx(tcx) } } } } |