@@ -293,7 +293,7 @@ fn build_union(cx: &mut DocContext<'_>, did: DefId) -> clean::Union {
293
293
294
294
fn build_type_alias ( cx : & mut DocContext < ' _ > , did : DefId ) -> Box < clean:: Typedef > {
295
295
let predicates = cx. tcx . explicit_predicates_of ( did) ;
296
- let type_ = clean_middle_ty ( cx. tcx . type_of ( did) , cx, Some ( did) ) ;
296
+ let type_ = clean_middle_ty ( ty :: Binder :: dummy ( cx. tcx . type_of ( did) ) , cx, Some ( did) ) ;
297
297
298
298
Box :: new ( clean:: Typedef {
299
299
type_,
@@ -405,7 +405,7 @@ pub(crate) fn build_impl(
405
405
406
406
let for_ = match & impl_item {
407
407
Some ( impl_) => clean_ty ( impl_. self_ty , cx) ,
408
- None => clean_middle_ty ( tcx. type_of ( did) , cx, Some ( did) ) ,
408
+ None => clean_middle_ty ( ty :: Binder :: dummy ( tcx. type_of ( did) ) , cx, Some ( did) ) ,
409
409
} ;
410
410
411
411
// Only inline impl if the implementing type is
@@ -641,14 +641,14 @@ pub(crate) fn print_inlined_const(tcx: TyCtxt<'_>, did: DefId) -> String {
641
641
642
642
fn build_const ( cx : & mut DocContext < ' _ > , def_id : DefId ) -> clean:: Constant {
643
643
clean:: Constant {
644
- type_ : clean_middle_ty ( cx. tcx . type_of ( def_id) , cx, Some ( def_id) ) ,
644
+ type_ : clean_middle_ty ( ty :: Binder :: dummy ( cx. tcx . type_of ( def_id) ) , cx, Some ( def_id) ) ,
645
645
kind : clean:: ConstantKind :: Extern { def_id } ,
646
646
}
647
647
}
648
648
649
649
fn build_static ( cx : & mut DocContext < ' _ > , did : DefId , mutable : bool ) -> clean:: Static {
650
650
clean:: Static {
651
- type_ : clean_middle_ty ( cx. tcx . type_of ( did) , cx, Some ( did) ) ,
651
+ type_ : clean_middle_ty ( ty :: Binder :: dummy ( cx. tcx . type_of ( did) ) , cx, Some ( did) ) ,
652
652
mutability : if mutable { Mutability :: Mut } else { Mutability :: Not } ,
653
653
expr : None ,
654
654
}
0 commit comments