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