File tree 2 files changed +20
-9
lines changed
2 files changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -337,18 +337,13 @@ pub fn build_impl(
337
337
// reachable in rustdoc generated documentation
338
338
if !did. is_local ( ) {
339
339
if let Some ( traitref) = associated_trait {
340
- if !cx. renderinfo . borrow ( ) . access_levels . is_public ( traitref. def_id ) {
340
+ let did = traitref. def_id ;
341
+ if !cx. renderinfo . borrow ( ) . access_levels . is_public ( did) {
341
342
return ;
342
343
}
343
- }
344
344
345
- // Skip foreign unstable traits from lists of trait implementations and
346
- // such. This helps prevent dependencies of the standard library, for
347
- // example, from getting documented as "traits `u32` implements" which
348
- // isn't really too helpful.
349
- if let Some ( trait_did) = associated_trait {
350
- if let Some ( stab) = cx. tcx . lookup_stability ( trait_did. def_id ) {
351
- if stab. level . is_unstable ( ) {
345
+ if let Some ( stab) = tcx. lookup_stability ( did) {
346
+ if stab. level . is_unstable ( ) && stab. feature == sym:: rustc_private {
352
347
return ;
353
348
}
354
349
}
@@ -372,6 +367,12 @@ pub fn build_impl(
372
367
if !cx. renderinfo . borrow ( ) . access_levels . is_public ( did) {
373
368
return ;
374
369
}
370
+
371
+ if let Some ( stab) = tcx. lookup_stability ( did) {
372
+ if stab. level . is_unstable ( ) && stab. feature == sym:: rustc_private {
373
+ return ;
374
+ }
375
+ }
375
376
}
376
377
}
377
378
Original file line number Diff line number Diff line change @@ -142,6 +142,16 @@ fn is_exception(file: &Path, link: &str) -> bool {
142
142
if let Some ( entry) = LINKCHECK_EXCEPTIONS . iter ( ) . find ( |& ( f, _) | file. ends_with ( f) ) {
143
143
entry. 1 . contains ( & link)
144
144
} else {
145
+ // FIXME(#63351): Concat trait in alloc/slice reexported in primitive page
146
+ //
147
+ // NOTE: This cannot be added to `LINKCHECK_EXCEPTIONS` because the resolved path
148
+ // calculated in `check` function is outside `build/<triple>/doc` dir.
149
+ // So the `strip_prefix` method just returns the old absolute broken path.
150
+ if file. ends_with ( "std/primitive.slice.html" ) {
151
+ if link. ends_with ( "std/primitive.slice.html" ) {
152
+ return true ;
153
+ }
154
+ }
145
155
false
146
156
}
147
157
}
You can’t perform that action at this time.
0 commit comments