@@ -293,7 +293,7 @@ fn build_union(cx: &mut DocContext<'_>, did: DefId) -> clean::Union {
293293
294294fn build_type_alias ( cx : & mut DocContext < ' _ > , did : DefId ) -> Box < clean:: Typedef > {
295295 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) ) ;
297297
298298 Box :: new ( clean:: Typedef {
299299 type_,
@@ -405,7 +405,7 @@ pub(crate) fn build_impl(
405405
406406 let for_ = match & impl_item {
407407 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) ) ,
409409 } ;
410410
411411 // Only inline impl if the implementing type is
@@ -641,14 +641,14 @@ pub(crate) fn print_inlined_const(tcx: TyCtxt<'_>, did: DefId) -> String {
641641
642642fn build_const ( cx : & mut DocContext < ' _ > , def_id : DefId ) -> clean:: Constant {
643643 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) ) ,
645645 kind : clean:: ConstantKind :: Extern { def_id } ,
646646 }
647647}
648648
649649fn build_static ( cx : & mut DocContext < ' _ > , did : DefId , mutable : bool ) -> clean:: Static {
650650 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) ) ,
652652 mutability : if mutable { Mutability :: Mut } else { Mutability :: Not } ,
653653 expr : None ,
654654 }
0 commit comments