1
Fork 0

rustdoc-json-types: ty -> type_

Fixes #94889
This commit is contained in:
Nixon Enraght-Moony 2022-03-13 23:13:57 +00:00
parent 21b0325c68
commit b526d8f27c
4 changed files with 25 additions and 11 deletions

View file

@ -345,9 +345,10 @@ impl FromWithTcx<clean::GenericParamDefKind> for GenericParamDefKind {
default: default.map(|x| (*x).into_tcx(tcx)),
synthetic,
},
Const { did: _, ty, default } => {
GenericParamDefKind::Const { ty: (*ty).into_tcx(tcx), default: default.map(|x| *x) }
}
Const { did: _, ty, default } => GenericParamDefKind::Const {
type_: (*ty).into_tcx(tcx),
default: default.map(|x| *x),
},
}
}
}
@ -357,7 +358,7 @@ impl FromWithTcx<clean::WherePredicate> for WherePredicate {
use clean::WherePredicate::*;
match predicate {
BoundPredicate { ty, bounds, .. } => WherePredicate::BoundPredicate {
ty: ty.into_tcx(tcx),
type_: ty.into_tcx(tcx),
bounds: bounds.into_iter().map(|x| x.into_tcx(tcx)).collect(),
// FIXME: add `bound_params` to rustdoc-json-params?
},