rustdoc: Rename bounds to bindings where appropriate
This commit is contained in:
parent
ff2439b7b9
commit
f2ecfc7e2e
@ -119,7 +119,7 @@ fn clean(&self, cx: &mut DocContext<'_>) -> GenericBound {
|
|||||||
|
|
||||||
impl Clean<Path> for (ty::TraitRef<'_>, &[TypeBinding]) {
|
impl Clean<Path> for (ty::TraitRef<'_>, &[TypeBinding]) {
|
||||||
fn clean(&self, cx: &mut DocContext<'_>) -> Path {
|
fn clean(&self, cx: &mut DocContext<'_>) -> Path {
|
||||||
let (trait_ref, bounds) = *self;
|
let (trait_ref, bindings) = *self;
|
||||||
let kind = cx.tcx.def_kind(trait_ref.def_id).into();
|
let kind = cx.tcx.def_kind(trait_ref.def_id).into();
|
||||||
if !matches!(kind, ItemType::Trait | ItemType::TraitAlias) {
|
if !matches!(kind, ItemType::Trait | ItemType::TraitAlias) {
|
||||||
span_bug!(
|
span_bug!(
|
||||||
@ -129,7 +129,7 @@ fn clean(&self, cx: &mut DocContext<'_>) -> Path {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
inline::record_extern_fqn(cx, trait_ref.def_id, kind);
|
inline::record_extern_fqn(cx, trait_ref.def_id, kind);
|
||||||
let path = external_path(cx, trait_ref.def_id, true, bounds.to_vec(), trait_ref.substs);
|
let path = external_path(cx, trait_ref.def_id, true, bindings.to_vec(), trait_ref.substs);
|
||||||
|
|
||||||
debug!("ty::TraitRef\n subst: {:?}\n", trait_ref.substs);
|
debug!("ty::TraitRef\n subst: {:?}\n", trait_ref.substs);
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ fn clean(&self, cx: &mut DocContext<'_>) -> Path {
|
|||||||
|
|
||||||
impl Clean<GenericBound> for (ty::PolyTraitRef<'_>, &[TypeBinding]) {
|
impl Clean<GenericBound> for (ty::PolyTraitRef<'_>, &[TypeBinding]) {
|
||||||
fn clean(&self, cx: &mut DocContext<'_>) -> GenericBound {
|
fn clean(&self, cx: &mut DocContext<'_>) -> GenericBound {
|
||||||
let (poly_trait_ref, bounds) = *self;
|
let (poly_trait_ref, bindings) = *self;
|
||||||
let poly_trait_ref = poly_trait_ref.lift_to_tcx(cx.tcx).unwrap();
|
let poly_trait_ref = poly_trait_ref.lift_to_tcx(cx.tcx).unwrap();
|
||||||
|
|
||||||
// collect any late bound regions
|
// collect any late bound regions
|
||||||
@ -164,7 +164,7 @@ fn clean(&self, cx: &mut DocContext<'_>) -> GenericBound {
|
|||||||
|
|
||||||
GenericBound::TraitBound(
|
GenericBound::TraitBound(
|
||||||
PolyTrait {
|
PolyTrait {
|
||||||
trait_: (poly_trait_ref.skip_binder(), bounds).clean(cx),
|
trait_: (poly_trait_ref.skip_binder(), bindings).clean(cx),
|
||||||
generic_params: late_bound_regions,
|
generic_params: late_bound_regions,
|
||||||
},
|
},
|
||||||
hir::TraitBoundModifier::None,
|
hir::TraitBoundModifier::None,
|
||||||
|
Loading…
Reference in New Issue
Block a user