Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/librustdoc/clean/auto_trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ where
unsafety: hir::Unsafety::Normal,
generics: new_generics,
trait_: Some(clean_trait_ref_with_bindings(self.cx, trait_ref, ThinVec::new())),
for_: clean_middle_ty(ty::Binder::dummy(ty), self.cx, None),
for_: clean_middle_ty(ty::Binder::dummy(ty), self.cx, None, None),
items: Vec::new(),
polarity,
kind: ImplKind::Auto,
Expand Down
8 changes: 7 additions & 1 deletion src/librustdoc/clean/blanket_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
ty::Binder::dummy(trait_ref.subst_identity()),
ThinVec::new(),
)),
for_: clean_middle_ty(ty::Binder::dummy(ty.subst_identity()), cx, None),
for_: clean_middle_ty(
ty::Binder::dummy(ty.subst_identity()),
cx,
None,
None,
),
items: cx
.tcx
.associated_items(impl_def_id)
Expand All @@ -119,6 +124,7 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
ty::Binder::dummy(trait_ref.subst_identity().self_ty()),
cx,
None,
None,
))),
}))),
cfg: None,
Expand Down
19 changes: 14 additions & 5 deletions src/librustdoc/clean/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,12 @@ fn build_union(cx: &mut DocContext<'_>, did: DefId) -> clean::Union {

fn build_type_alias(cx: &mut DocContext<'_>, did: DefId) -> Box<clean::Typedef> {
let predicates = cx.tcx.explicit_predicates_of(did);
let type_ =
clean_middle_ty(ty::Binder::dummy(cx.tcx.type_of(did).subst_identity()), cx, Some(did));
let type_ = clean_middle_ty(
ty::Binder::dummy(cx.tcx.type_of(did).subst_identity()),
cx,
Some(did),
None,
);

Box::new(clean::Typedef {
type_,
Expand Down Expand Up @@ -386,9 +390,12 @@ pub(crate) fn build_impl(

let for_ = match &impl_item {
Some(impl_) => clean_ty(impl_.self_ty, cx),
None => {
clean_middle_ty(ty::Binder::dummy(tcx.type_of(did).subst_identity()), cx, Some(did))
}
None => clean_middle_ty(
ty::Binder::dummy(tcx.type_of(did).subst_identity()),
cx,
Some(did),
None,
),
};

// Only inline impl if the implementing type is
Expand Down Expand Up @@ -630,6 +637,7 @@ fn build_const(cx: &mut DocContext<'_>, def_id: DefId) -> clean::Constant {
ty::Binder::dummy(cx.tcx.type_of(def_id).subst_identity()),
cx,
Some(def_id),
None,
),
kind: clean::ConstantKind::Extern { def_id },
}
Expand All @@ -641,6 +649,7 @@ fn build_static(cx: &mut DocContext<'_>, did: DefId, mutable: bool) -> clean::St
ty::Binder::dummy(cx.tcx.type_of(did).subst_identity()),
cx,
Some(did),
None,
),
mutability: if mutable { Mutability::Mut } else { Mutability::Not },
expr: None,
Expand Down
Loading