File tree Expand file tree Collapse file tree 2 files changed +20
-9
lines changed Expand file tree Collapse file tree 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(
337337 // reachable in rustdoc generated documentation
338338 if !did. is_local ( ) {
339339 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) {
341342 return ;
342343 }
343- }
344344
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 {
352347 return ;
353348 }
354349 }
@@ -372,6 +367,12 @@ pub fn build_impl(
372367 if !cx. renderinfo . borrow ( ) . access_levels . is_public ( did) {
373368 return ;
374369 }
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+ }
375376 }
376377 }
377378
Original file line number Diff line number Diff line change @@ -141,6 +141,16 @@ fn is_exception(file: &Path, link: &str) -> bool {
141141 if let Some ( entry) = LINKCHECK_EXCEPTIONS . iter ( ) . find ( |& ( f, _) | file. ends_with ( f) ) {
142142 entry. 1 . contains ( & link)
143143 } else {
144+ // FIXME(#63351): Concat trait in alloc/slice reexported in primitive page
145+ //
146+ // NOTE: This cannot be added to `LINKCHECK_EXCEPTIONS` because the resolved path
147+ // calculated in `check` function is outside `build/<triple>/doc` dir.
148+ // So the `strip_prefix` method just returns the old absolute broken path.
149+ if file. ends_with ( "std/primitive.slice.html" ) {
150+ if link. ends_with ( "primitive.slice.html" ) {
151+ return true ;
152+ }
153+ }
144154 false
145155 }
146156}
You can’t perform that action at this time.
0 commit comments