@@ -296,7 +296,6 @@ pub fn build_impls(cx: &DocContext, did: DefId, auto_traits: bool) -> Vec<clean:
296
296
297
297
pub fn build_impl ( cx : & DocContext , did : DefId , ret : & mut Vec < clean:: Item > ) {
298
298
if !cx. renderinfo . borrow_mut ( ) . inlined . insert ( did) {
299
- debug ! ( "already inlined, bailing: {:?}" , did) ;
300
299
return
301
300
}
302
301
@@ -306,25 +305,19 @@ pub fn build_impl(cx: &DocContext, did: DefId, ret: &mut Vec<clean::Item>) {
306
305
307
306
// Only inline impl if the implemented trait is
308
307
// reachable in rustdoc generated documentation
309
- if !did. is_local ( ) {
310
- if let Some ( traitref) = associated_trait {
311
- if !cx. access_levels . borrow ( ) . is_doc_reachable ( traitref. def_id ) {
312
- debug ! ( "trait {:?} not reachable, bailing: {:?}" , traitref. def_id, did) ;
313
- return
314
- }
308
+ if let Some ( traitref) = associated_trait {
309
+ if !cx. access_levels . borrow ( ) . is_doc_reachable ( traitref. def_id ) {
310
+ return
315
311
}
316
312
}
317
313
318
314
let for_ = tcx. type_of ( did) . clean ( cx) ;
319
315
320
316
// Only inline impl if the implementing type is
321
317
// reachable in rustdoc generated documentation
322
- if !did. is_local ( ) {
323
- if let Some ( did) = for_. def_id ( ) {
324
- if !cx. access_levels . borrow ( ) . is_doc_reachable ( did) {
325
- debug ! ( "impl type {:?} not accessible, bailing" , did) ;
326
- return
327
- }
318
+ if let Some ( did) = for_. def_id ( ) {
319
+ if !cx. access_levels . borrow ( ) . is_doc_reachable ( did) {
320
+ return
328
321
}
329
322
}
330
323
@@ -357,6 +350,8 @@ pub fn build_impl(cx: &DocContext, did: DefId, ret: &mut Vec<clean::Item>) {
357
350
. collect ( )
358
351
} ) . unwrap_or ( FxHashSet ( ) ) ;
359
352
353
+ debug ! ( "build_impl: impl {:?} for {:?}" , trait_. def_id( ) , for_. def_id( ) ) ;
354
+
360
355
ret. push ( clean:: Item {
361
356
inner : clean:: ImplItem ( clean:: Impl {
362
357
unsafety : hir:: Unsafety :: Normal ,
0 commit comments