Skip to content

Enable --generate-link-to-definition rustdoc option on std docs - #162808

Draft
GuillaumeGomez wants to merge 1 commit into
rust-lang:mainfrom
GuillaumeGomez:std-link-to-def
Draft

GuillaumeGomez wants to merge 1 commit into
rust-lang:mainfrom
GuillaumeGomez:std-link-to-def

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

In the future (unclear at which point), rustdoc plans to get closer to the rust compiler and compile more of the code, making the std code not compile anymore because of all the cfg(doc) in it to present a unified API to our users. To fix it (although incompletely), we can use the --generate-link-to-definition rustdoc option (which we already use in the compiler docs) which requires to query more information and fails with current std code. This PR fixes these errors and prevent regressions by enabling the new rustdoc option.

r? @Amanieu

@rustbot rustbot added O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) O-linux Operating system: Linux O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 15, 2026
Comment thread library/std/src/lib.rs Outdated
$($code)*
}
#[cfg(doc)]
loop {}

@GuillaumeGomez GuillaumeGomez Sep 15, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little hack to ensure that the code is not compiled and won't fail compilation whatever the return type since loop returns !.

View changes since the review

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ labels Sep 15, 2026
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-aarch64-gnu-llvm-21-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[endgroup]
[TIMING:end] tool::ToolBuild { build_compiler: Compiler { stage: 0, host: aarch64-unknown-linux-gnu, forced_compiler: false }, target: aarch64-unknown-linux-gnu, tool: "linkchecker", path: "src/tools/linkchecker", mode: ToolBootstrap, source_type: InTree, extra_features: [], allow_features: "", cargo_args: [], artifact_kind: Binary } -- 0.102
[TIMING:end] tool::Linkchecker { compiler: Compiler { stage: 0, host: aarch64-unknown-linux-gnu, forced_compiler: false }, target: aarch64-unknown-linux-gnu } -- 0.000
##[group]Testing stage1 Linkcheck (aarch64-unknown-linux-gnu)
src/test/lib.rs.html:751: broken link - `alloc/primitive.slice.html`
src/test/bench.rs.html:233: broken link - `alloc/primitive.slice.html`
src/test/stats.rs.html:9: broken link - `alloc/primitive.slice.html`
src/test/stats.rs.html:235: broken link - `alloc/primitive.slice.html`
src/test/stats.rs.html:241: broken link - `alloc/primitive.slice.html`
src/test/stats.rs.html:290: broken link - `alloc/primitive.slice.html`
src/test/helpers/metrics.rs.html:49: broken link - `alloc/primitive.slice.html`
src/test/term/terminfo/parser/compiled.rs.html:323: broken link - `alloc/primitive.slice.html`
src/test/term/terminfo/parser/compiled.rs.html:324: broken link - `alloc/primitive.slice.html`
src/test/term/terminfo/parser/compiled.rs.html:325: broken link - `alloc/primitive.slice.html`
src/test/term/terminfo/parser/compiled.rs.html:326: broken link - `alloc/primitive.slice.html`
src/test/term/terminfo/mod.rs.html:150: broken link - `alloc/io/error/struct.Error.html`
src/test/term/terminfo/mod.rs.html:186: broken link - `alloc/io/error/struct.Error.html`
src/test/test_result.rs.html:55: broken link - `core/foreigntype.any.html`
src/test/test_result.rs.html:57: broken link - `core/foreigntype.any.html`
src/test/formatters/junit.rs.html:31: broken link - `alloc/primitive.str.html`
src/test/formatters/junit.rs.html:32: broken link - `alloc/primitive.str.html`
src/test/formatters/junit.rs.html:34: broken link - `alloc/primitive.str.html`
src/test/formatters/junit.rs.html:36: broken link - `alloc/primitive.str.html`
src/test/formatters/junit.rs.html:84: broken link - `alloc/primitive.slice.html`
src/test/formatters/junit.rs.html:214: broken link - `alloc/primitive.slice.html`
src/test/formatters/terse.rs.html:142: broken link - `alloc/primitive.slice.html`
src/test/formatters/terse.rs.html:168: broken link - `alloc/primitive.slice.html`
src/test/formatters/pretty.rs.html:150: broken link - `alloc/primitive.slice.html`
src/test/types.rs.html:218: broken link - `alloc/primitive.str.html`
src/std/io/stdio.rs.html:552: broken link - `alloc/io/util/trait.SpecReadByte.html`
src/std/panic.rs.html:127: broken link - `core/foreigntype.any.html`
src/std/panic.rs.html:129: broken link - `core/foreigntype.any.html`
src/std/panicking.rs.html:12: broken link - `alloc/panicking/trait.PanicPayload.html`
src/std/panicking.rs.html:64: broken link - `alloc/panicking/trait.PanicPayload.html`
src/std/panicking.rs.html:628: broken link - `alloc/panicking/trait.PanicPayload.html`
src/std/panicking.rs.html:654: broken link - `alloc/panicking/trait.PanicPayload.html`
src/std/panicking.rs.html:716: broken link - `alloc/panicking/trait.PanicPayload.html`
src/std/panicking.rs.html:758: broken link - `core/foreigntype.any.html`
src/std/panicking.rs.html:760: broken link - `core/foreigntype.any.html`
src/std/panicking.rs.html:774: broken link - `alloc/panicking/trait.PanicPayload.html`
src/std/panicking.rs.html:788: broken link - `alloc/panicking/trait.PanicPayload.html`
src/std/panicking.rs.html:813: broken link - `alloc/panicking/trait.PanicPayload.html`
src/std/panicking.rs.html:819: broken link - `alloc/panicking/trait.PanicPayload.html`
src/std/panicking.rs.html:858: broken link - `alloc/panicking/trait.PanicPayload.html`
src/std/panicking.rs.html:882: broken link - `alloc/panicking/trait.PanicPayload.html`
src/std/sys/io/kernel_copy/linux.rs.html:269: broken link - `alloc/io/copy/enum.CopyState.html`
src/std/sys/io/kernel_copy/linux.rs.html:303: broken link - `alloc/io/copy/enum.CopyState.html`
src/std/sys/io/kernel_copy/linux.rs.html:322: broken link - `alloc/io/copy/enum.CopyState.html`
src/std/sys/io/kernel_copy/linux.rs.html:337: broken link - `alloc/io/copy/enum.CopyState.html`
src/std/sys/io/kernel_copy/linux.rs.html:349: broken link - `alloc/io/copy/enum.CopyState.html`
src/std/sys/pal/unix/time.rs.html:2: broken link - `core/num/niche_types/struct.Nanoseconds.html`
src/std/sys/pal/unix/time.rs.html:28: broken link - `core/num/niche_types/struct.Nanoseconds.html`
src/std/sys/pal/unix/time.rs.html:40: broken link - `core/num/niche_types/struct.Nanoseconds.html`
src/std/sys/pal/unix/time.rs.html:40: broken link - `core/num/niche_types/struct.Nanoseconds.html`
src/std/sys/pal/unix/time.rs.html:120: broken link - `core/num/niche_types/struct.Nanoseconds.html`
src/std/sys/pal/unix/time.rs.html:120: broken link - `core/num/niche_types/struct.Nanoseconds.html`
src/std/sys/pal/unix/time.rs.html:123: broken link - `core/num/niche_types/struct.Nanoseconds.html`
src/std/sys/pal/unix/time.rs.html:123: broken link - `core/num/niche_types/struct.Nanoseconds.html`
src/std/sys/pal/unix/time.rs.html:132: broken link - `core/num/niche_types/struct.Nanoseconds.html`
src/std/sys/pal/unix/time.rs.html:132: broken link - `core/num/niche_types/struct.Nanoseconds.html`
src/std/sys/pal/unix/time.rs.html:150: broken link - `core/num/niche_types/struct.Nanoseconds.html`
src/std/sys/pal/unix/time.rs.html:162: broken link - `core/num/niche_types/struct.Nanoseconds.html`
src/std/sys/fs/unix.rs.html:1167: broken link - `alloc/io/error/struct.Error.html`
src/std/sys/fs/unix.rs.html:1172: broken link - `alloc/io/error/struct.Error.html`
src/std/sys/fs/unix.rs.html:1186: broken link - `alloc/io/error/struct.Error.html`
src/std/sys/fs/unix.rs.html:1194: broken link - `alloc/io/error/struct.Error.html`
src/std/sys/fs/unix.rs.html:2086: broken link - `alloc/primitive.slice.html`
src/std/sys/env/unix.rs.html:102: broken link - `core/slice/memchr/fn.memchr.html`
src/std/sys/env/unix.rs.html:105: broken link - `alloc/primitive.slice.html`
src/std/sys/env/unix.rs.html:106: broken link - `alloc/primitive.slice.html`
src/std/sys/env/unix.rs.html:123: broken link - `alloc/primitive.slice.html`
src/std/sys/process/unix/unix.rs.html:819: broken link - `alloc/io/error/struct.Error.html`
src/std/sys/os_str/bytes.rs.html:188: broken link - `alloc/primitive.slice.html`
src/std/sys/os_str/bytes.rs.html:306: broken link - `alloc/primitive.slice.html`
src/std/sys/os_str/bytes.rs.html:344: broken link - `alloc/primitive.slice.html`
src/std/sys/os_str/bytes.rs.html:349: broken link - `alloc/primitive.slice.html`
src/std/sys/paths/unix.rs.html:478: broken link - `alloc/primitive.slice.html`
src/std/sys/net/connection/socket/unix.rs.html:53: broken link - `alloc/ffi/c_str/struct.CStr.html`
src/std/sys/net/connection/socket/unix.rs.html:59: broken link - `alloc/io/error/struct.Error.html`
src/std/os/windows/io/socket.rs.html:14: broken link - `core/num/niche_types/type.NotAllOnes.html`
src/std/os/windows/io/socket.rs.html:66: broken link - `core/num/niche_types/struct.U64NotAllOnes.html`
src/std/os/windows/io/socket.rs.html:171: broken link - `core/num/niche_types/struct.U64NotAllOnes.html`
src/std/os/windows/io/socket.rs.html:179: broken link - `core/num/niche_types/struct.U64NotAllOnes.html`
src/std/os/windows/io/socket.rs.html:187: broken link - `core/num/niche_types/struct.U64NotAllOnes.html`
src/std/os/windows/io/socket.rs.html:196: broken link - `core/num/niche_types/struct.U64NotAllOnes.html`
src/std/os/fd/owned.rs.html:27: broken link - `core/num/niche_types/type.NotAllOnes.html`
src/std/os/fd/owned.rs.html:91: broken link - `core/num/niche_types/struct.I32NotAllOnes.html`
src/std/os/fd/owned.rs.html:159: broken link - `core/num/niche_types/struct.I32NotAllOnes.html`
src/std/os/fd/owned.rs.html:167: broken link - `core/num/niche_types/struct.I32NotAllOnes.html`
src/std/os/fd/owned.rs.html:175: broken link - `core/num/niche_types/struct.I32NotAllOnes.html`
src/std/os/fd/owned.rs.html:196: broken link - `core/num/niche_types/struct.I32NotAllOnes.html`
src/std/os/fd/owned.rs.html:219: broken link - `core/num/niche_types/struct.I32NotAllOnes.html`
src/std/os/fd/owned.rs.html:221: broken link - `core/num/niche_types/struct.I32NotAllOnes.html`
src/std/os/unix/net/addr.rs.html:122: broken link - `core/slice/memchr/fn.memchr.html`
src/std/os/unix/net/addr.rs.html:268: broken link - `core/slice/memchr/fn.memchr.html`
src/std/error.rs.html:456: broken link - `core/foreigntype.error.html`
src/std/error.rs.html:466: broken link - `core/foreigntype.error.html`
src/std/hash/random.rs.html:84: broken link - `core/hash/sip/struct.SipHasher13.html`
src/std/hash/random.rs.html:107: broken link - `core/hash/sip/struct.SipHasher13.html`
src/proc_macro/bridge/panic_message.rs.html:15: broken link - `core/foreigntype.any.html`
src/proc_macro/diagnostic.rs.html:42: broken link - `alloc/primitive.slice.html`
src/alloc/io/util.rs.html:352: broken link - `core/io/size_hint/trait.SizeHint.html`
src/alloc/io/impls.rs.html:141: broken link - `core/io/size_hint/trait.SizeHint.html`
src/alloc/io/impls.rs.html:146: broken link - `core/io/size_hint/trait.SizeHint.html`
src/alloc/io/buffered/linewritershim.rs.html:68: broken link - `core/slice/memchr/fn.memchr.html`
src/alloc/io/buffered/linewritershim.rs.html:143: broken link - `core/slice/memchr/fn.memrchr.html`
src/alloc/io/buffered/linewritershim.rs.html:208: broken link - `core/slice/memchr/fn.memrchr.html`
src/alloc/io/buffered/linewritershim.rs.html:297: broken link - `core/slice/memchr/fn.memrchr.html`
src/alloc/io/buffered/bufreader.rs.html:620: broken link - `core/io/size_hint/trait.SizeHint.html`
src/alloc/io/buffered/bufreader.rs.html:625: broken link - `core/io/size_hint/trait.SizeHint.html`
src/alloc/io/error.rs.html:119: broken link - `core/io/error/struct.CustomOwner.html`
src/alloc/io/error.rs.html:125: broken link - `core/io/error/struct.Custom.html`
src/alloc/io/error.rs.html:211: broken link - `core/foreigntype.error.html`
src/alloc/io/error.rs.html:271: broken link - `core/io/error/struct.Custom.html`
src/alloc/io/buf_read.rs.html:443: broken link - `core/slice/memchr/fn.memchr.html`
src/alloc/io/buf_read.rs.html:490: broken link - `core/slice/memchr/fn.memchr.html`
src/alloc/collections/vec_deque/mod.rs.html:3384: broken link - `core/cmp/Ordering/variant.Equal.html`
src/alloc/collections/vec_deque/mod.rs.html:3386: broken link - `core/cmp/Ordering/variant.Less.html`
src/alloc/collections/btree/set.rs.html:2: broken link - `core/cmp/Ordering/variant.Equal.html`
src/alloc/collections/btree/set.rs.html:2: broken link - `core/cmp/Ordering/variant.Greater.html`
src/alloc/collections/btree/set.rs.html:2: broken link - `core/cmp/Ordering/variant.Less.html`
src/alloc/collections/btree/set.rs.html:439: broken link - `core/cmp/Ordering/variant.Greater.html`
src/alloc/collections/btree/set.rs.html:439: broken link - `core/cmp/Ordering/variant.Less.html`
src/alloc/collections/btree/set.rs.html:440: broken link - `core/cmp/Ordering/variant.Equal.html`
src/alloc/collections/btree/set.rs.html:445: broken link - `core/cmp/Ordering/variant.Equal.html`
src/alloc/collections/btree/set.rs.html:527: broken link - `core/cmp/Ordering/variant.Greater.html`
src/alloc/collections/btree/set.rs.html:527: broken link - `core/cmp/Ordering/variant.Less.html`
src/alloc/collections/btree/set.rs.html:528: broken link - `core/cmp/Ordering/variant.Equal.html`
src/alloc/collections/btree/set.rs.html:529: broken link - `core/cmp/Ordering/variant.Equal.html`
src/alloc/collections/btree/set.rs.html:701: broken link - `core/cmp/Ordering/variant.Less.html`
src/alloc/collections/btree/set.rs.html:702: broken link - `core/cmp/Ordering/variant.Equal.html`
src/alloc/collections/btree/set.rs.html:706: broken link - `core/cmp/Ordering/variant.Greater.html`
src/alloc/collections/btree/set.rs.html:710: broken link - `core/cmp/Ordering/variant.Greater.html`
src/alloc/collections/btree/set.rs.html:711: broken link - `core/cmp/Ordering/variant.Equal.html`
src/alloc/collections/btree/set.rs.html:715: broken link - `core/cmp/Ordering/variant.Less.html`
src/alloc/collections/btree/set.rs.html:1960: broken link - `core/cmp/Ordering/variant.Less.html`
src/alloc/collections/btree/set.rs.html:1961: broken link - `core/cmp/Ordering/variant.Less.html`
src/alloc/collections/btree/set.rs.html:1962: broken link - `core/cmp/Ordering/variant.Equal.html`
src/alloc/collections/btree/set.rs.html:1966: broken link - `core/cmp/Ordering/variant.Greater.html`
src/alloc/collections/btree/set.rs.html:2063: broken link - `core/cmp/Ordering/variant.Less.html`
src/alloc/collections/btree/set.rs.html:2064: broken link - `core/cmp/Ordering/variant.Greater.html`
src/alloc/collections/btree/set.rs.html:2065: broken link - `core/cmp/Ordering/variant.Equal.html`
src/alloc/collections/btree/merge_iter.rs.html:79: broken link - `core/cmp/Ordering/variant.Less.html`
src/alloc/collections/btree/merge_iter.rs.html:80: broken link - `core/cmp/Ordering/variant.Greater.html`
src/alloc/collections/btree/merge_iter.rs.html:81: broken link - `core/cmp/Ordering/variant.Equal.html`
src/alloc/collections/btree/map.rs.html:1318: broken link - `core/cmp/Ordering/variant.Equal.html`
src/alloc/collections/btree/map.rs.html:1332: broken link - `core/cmp/Ordering/variant.Greater.html`
src/alloc/collections/btree/map.rs.html:1338: broken link - `core/cmp/Ordering/variant.Less.html`
src/alloc/ffi/c_str.rs.html:265: broken link - `core/slice/memchr/fn.memchr.html`
src/alloc/ffi/c_str.rs.html:289: broken link - `core/slice/memchr/fn.memchr.html`
src/alloc/ffi/c_str.rs.html:687: broken link - `core/slice/memchr/fn.memchr.html`
src/alloc/fmt.rs.html:653: broken link fragment `#method.estimated_capacity` pointing to `core/fmt/struct.Arguments.html`
src/alloc/vec/in_place_collect.rs.html:224: broken link - `core/iter/adapters/trait.SourceIter.html`
src/alloc/vec/in_place_collect.rs.html:230: broken link - `core/iter/adapters/trait.SourceIter.html`
src/alloc/vec/in_place_collect.rs.html:237: broken link - `core/iter/traits/marker/trait.InPlaceIterable.html`
src/alloc/vec/in_place_collect.rs.html:237: broken link - `core/iter/traits/marker/trait.InPlaceIterable.html`
src/alloc/vec/in_place_collect.rs.html:252: broken link - `core/iter/adapters/trait.SourceIter.html`
src/alloc/vec/in_place_collect.rs.html:256: broken link - `core/iter/adapters/trait.SourceIter.html`
src/alloc/vec/in_place_collect.rs.html:274: broken link - `core/iter/adapters/trait.SourceIter.html`
src/alloc/vec/in_place_collect.rs.html:395: broken link - `core/iter/adapters/zip/trait.TrustedRandomAccessNoCoerce.html`
src/alloc/sync.rs.html:32: broken link - `core/sync/atomic/Ordering/variant.Acquire.html`
src/alloc/sync.rs.html:32: broken link - `core/sync/atomic/Ordering/variant.Relaxed.html`
src/alloc/sync.rs.html:32: broken link - `core/sync/atomic/Ordering/variant.Release.html`
src/alloc/sync.rs.html:876: broken link - `core/sync/atomic/Ordering/variant.Release.html`
src/alloc/sync.rs.html:1059: broken link - `core/sync/atomic/Ordering/variant.Relaxed.html`
src/alloc/sync.rs.html:1059: broken link - `core/sync/atomic/Ordering/variant.Relaxed.html`
src/alloc/sync.rs.html:1182: broken link - `core/sync/atomic/Ordering/variant.Release.html`
src/alloc/sync.rs.html:1872: broken link - `core/sync/atomic/Ordering/variant.Relaxed.html`
src/alloc/sync.rs.html:2048: broken link - `core/sync/atomic/Ordering/variant.Relaxed.html`
src/alloc/sync.rs.html:2054: broken link - `core/sync/atomic/Ordering/variant.Relaxed.html`
src/alloc/sync.rs.html:2069: broken link - `core/sync/atomic/Ordering/variant.Acquire.html`
src/alloc/sync.rs.html:2069: broken link - `core/sync/atomic/Ordering/variant.Relaxed.html`
src/alloc/sync.rs.html:2104: broken link - `core/sync/atomic/Ordering/variant.Relaxed.html`
src/alloc/sync.rs.html:2134: broken link - `core/sync/atomic/Ordering/variant.Relaxed.html`
src/alloc/sync.rs.html:2533: broken link - `core/sync/atomic/Ordering/variant.Relaxed.html`
src/alloc/sync.rs.html:2657: broken link - `core/sync/atomic/Ordering/variant.Acquire.html`
src/alloc/sync.rs.html:2657: broken link - `core/sync/atomic/Ordering/variant.Relaxed.html`
src/alloc/sync.rs.html:2660: broken link - `core/sync/atomic/Ordering/variant.Relaxed.html`
src/alloc/sync.rs.html:2682: broken link - `core/sync/atomic/Ordering/variant.Release.html`
src/alloc/sync.rs.html:2719: broken link - `core/sync/atomic/Ordering/variant.Release.html`
src/alloc/sync.rs.html:2938: broken link - `core/sync/atomic/Ordering/variant.Acquire.html`
src/alloc/sync.rs.html:2938: broken link - `core/sync/atomic/Ordering/variant.Relaxed.html`
src/alloc/sync.rs.html:2942: broken link - `core/sync/atomic/Ordering/variant.Acquire.html`
src/alloc/sync.rs.html:2947: broken link - `core/sync/atomic/Ordering/variant.Release.html`
src/alloc/sync.rs.html:2987: broken link - `core/sync/atomic/Ordering/variant.Release.html`
src/alloc/sync.rs.html:3061: broken link - `core/foreigntype.any.html`
src/alloc/sync.rs.html:3461: broken link - `core/sync/atomic/Ordering/variant.Acquire.html`
src/alloc/sync.rs.html:3461: broken link - `core/sync/atomic/Ordering/variant.Relaxed.html`
src/alloc/sync.rs.html:3475: broken link - `core/sync/atomic/Ordering/variant.Relaxed.html`
src/alloc/sync.rs.html:3493: broken link - `core/sync/atomic/Ordering/variant.Acquire.html`
src/alloc/sync.rs.html:3494: broken link - `core/sync/atomic/Ordering/variant.Relaxed.html`
src/alloc/sync.rs.html:3595: broken link - `core/sync/atomic/Ordering/variant.Relaxed.html`
src/alloc/sync.rs.html:3668: broken link - `core/sync/atomic/Ordering/variant.Release.html`
src/alloc/sync.rs.html:4985: broken link - `core/sync/atomic/Ordering/variant.Release.html`
src/alloc/sync.rs.html:4992: broken link - `core/sync/atomic/Ordering/variant.Acquire.html`
src/alloc/sync.rs.html:5043: broken link - `core/sync/atomic/Ordering/variant.Relaxed.html`
src/alloc/str.rs.html:49: broken link - `core/unicode/unicode_data/conversions/index.html`
src/alloc/raw_vec/mod.rs.html:39: broken link - `core/num/niche_types/struct.UsizeNoHighBit.html`
src/alloc/raw_vec/mod.rs.html:42: broken link - `core/num/niche_types/struct.UsizeNoHighBit.html`
src/alloc/raw_vec/mod.rs.html:49: broken link - `core/num/niche_types/struct.UsizeNoHighBit.html`
src/alloc/raw_vec/mod.rs.html:493: broken link - `core/num/niche_types/struct.UsizeNoHighBit.html`
src/alloc/raw_vec/mod.rs.html:506: broken link - `core/num/niche_types/struct.UsizeNoHighBit.html`
src/alloc/raw_vec/mod.rs.html:536: broken link - `core/num/niche_types/struct.UsizeNoHighBit.html`
src/alloc/raw_vec/mod.rs.html:585: broken link - `core/ptr/unique/struct.Unique.html`
src/alloc/raw_vec/mod.rs.html:611: broken link - `core/ptr/unique/struct.Unique.html`
src/alloc/raw_vec/mod.rs.html:627: broken link - `core/ptr/unique/struct.Unique.html`
src/alloc/raw_vec/mod.rs.html:627: broken link - `core/ptr/unique/struct.Unique.html`
src/alloc/raw_vec/mod.rs.html:632: broken link - `core/num/niche_types/struct.UsizeNoHighBit.html`
src/alloc/raw_vec/mod.rs.html:647: broken link - `core/num/niche_types/struct.UsizeNoHighBit.html`
src/alloc/raw_vec/mod.rs.html:656: broken link - `core/num/niche_types/struct.UsizeNoHighBit.html`
src/alloc/raw_vec/mod.rs.html:798: broken link - `core/num/niche_types/struct.UsizeNoHighBit.html`
src/alloc/raw_vec/mod.rs.html:870: broken link - `core/ptr/unique/struct.Unique.html`
src/alloc/wtf8/mod.rs.html:182: broken link - `core/wtf8/struct.CodePoint.html`
src/alloc/wtf8/mod.rs.html:189: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:195: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:204: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:277: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:299: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:299: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:302: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:304: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:313: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:317: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:326: broken link - `core/wtf8/struct.CodePoint.html`
src/alloc/wtf8/mod.rs.html:336: broken link - `core/wtf8/struct.CodePoint.html`
src/alloc/wtf8/mod.rs.html:337: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:338: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:346: broken link - `core/wtf8/struct.CodePoint.html`
src/alloc/wtf8/mod.rs.html:365: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:385: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:485: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:495: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:498: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:500: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:501: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:506: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:525: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:547: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:564: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:571: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:579: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/wtf8/mod.rs.html:585: broken link - `core/wtf8/struct.Wtf8.html`
src/alloc/rc.rs.html:2277: broken link - `core/foreigntype.any.html`
src/alloc/boxed/convert.rs.html:338: broken link - `core/foreigntype.any.html`
src/alloc/boxed/convert.rs.html:399: broken link - `core/foreigntype.any.html`
src/alloc/boxed/convert.rs.html:460: broken link - `core/foreigntype.any.html`
src/alloc/boxed/convert.rs.html:720: broken link - `core/foreigntype.error.html`
src/alloc/boxed.rs.html:1578: broken link - `core/ptr/unique/struct.Unique.html`
src/alloc/boxed.rs.html:2008: broken link - `core/ptr/unique/struct.Unique.html`
src/alloc/boxed.rs.html:2014: broken link - `core/ptr/unique/struct.Unique.html`
src/alloc/boxed.rs.html:2048: broken link - `core/ptr/unique/struct.Unique.html`
src/alloc/boxed.rs.html:2060: broken link - `core/ptr/unique/struct.Unique.html`
src/alloc/boxed.rs.html:2061: broken link - `core/ptr/unique/struct.Unique.html`
src/alloc/boxed.rs.html:2061: broken link - `core/ptr/unique/struct.Unique.html`
src/alloc/slice.rs.html:16: broken link - `core/cmp/Ordering/variant.Less.html`
src/alloc/slice.rs.html:196: broken link - `core/cmp/Ordering/variant.Less.html`
src/alloc/slice.rs.html:875: broken link - `core/slice/sort/stable/fn.sort.html`
NOTE: if you are adding or renaming a markdown file in a mdBook, don't forget to register the page in SUMMARY.md
checked links in: 25.6s
number of HTML files scanned: 62553
number of HTML redirects found: 22222
number of links checked: 3371979
number of links ignored due to external: 189520
---
Command `/checkout/obj/build/aarch64-unknown-linux-gnu/stage1-tools-bin/linkchecker /checkout/obj/build/aarch64-unknown-linux-gnu/doc` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/tool.rs:1627:23
Executed at: src/bootstrap/src/core/build_steps/test.rs:224:77

Command has failed. Rerun with -v to see more details.
Bootstrap failed while executing `--stage 2 test --skip tidy --skip intrinsic-test --skip src/tools/rust-analyzer --skip tests --skip library --skip tidyselftest`
Currently active steps:
test::Linkcheck { host: aarch64-unknown-linux-gnu } at src/bootstrap/src/core/build_steps/test.rs:161
Build completed unsuccessfully in 0:35:22
  local time: Tue Sep 15 14:30:08 UTC 2026

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

Seems like some work remains. Gonna convert it to draft for the time being.

@GuillaumeGomez
GuillaumeGomez marked this pull request as draft September 15, 2026 14:33
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 15, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 20, 2026
…Urgau

[rustdoc] Correctly handle `dyn` trait methods linking for jump to def feature

Part of the missing pieces for rust-lang#162808 to work.

The issue was that in case we had the method of a dyn trait, we tried to use the dyn trait as is and couldn't generate a correct href to its `DefId`. If we get the trait in the `dyn`, it works just as expected.

r? @Urgau
rust-bors Bot pushed a commit that referenced this pull request Sep 21, 2026
Rollup merge of #163036 - GuillaumeGomez:dyn-jump-to-def, r=Urgau

[rustdoc] Correctly handle `dyn` trait methods linking for jump to def feature

Part of the missing pieces for #162808 to work.

The issue was that in case we had the method of a dyn trait, we tried to use the dyn trait as is and couldn't generate a correct href to its `DefId`. If we get the trait in the `dyn`, it works just as expected.

r? @Urgau
jhpratt added a commit to jhpratt/rust that referenced this pull request Sep 25, 2026
… r=Urgau

[rustdoc] Correctly check that an item is not `doc(hidden)` with `--generate-link-to-definition`

Needed for rust-lang#162808.

The problem was that we only checked the item itself, not any of its parents. Fixed by adding a loop.

r? @Urgau
rust-bors Bot pushed a commit that referenced this pull request Sep 25, 2026
Rollup merge of #163268 - GuillaumeGomez:jump-to-def-hidden, r=Urgau

[rustdoc] Correctly check that an item is not `doc(hidden)` with `--generate-link-to-definition`

Needed for #162808.

The problem was that we only checked the item itself, not any of its parents. Fixed by adding a loop.

r? @Urgau
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 25, 2026
…ent, r=Urgau

[rustdoc] Fix invalid jump to def link when `#[rustc_allow_incoherent_impl]` is involved

Fixes rust-lang#163112.

Problem here is that the method is not available in the crate where the type is defined. So `def_path` is actually problematic here as it resolves to the end item, which is not what we want. So instead, I made a simplified version of the `rustc_middle::ty::print::pretty::try_print_visible_def_path_recur` function.

It's also needed for rust-lang#162808.

r? @Urgau
jhpratt added a commit to jhpratt/rust that referenced this pull request Sep 26, 2026
…ent, r=Urgau

[rustdoc] Fix invalid jump to def link when `#[rustc_allow_incoherent_impl]` is involved

Fixes rust-lang#163112.

Problem here is that the method is not available in the crate where the type is defined. So `def_path` is actually problematic here as it resolves to the end item, which is not what we want. So instead, I made a simplified version of the `rustc_middle::ty::print::pretty::try_print_visible_def_path_recur` function.

It's also needed for rust-lang#162808.

r? @Urgau
rust-bors Bot pushed a commit that referenced this pull request Sep 26, 2026
Rollup merge of #163133 - GuillaumeGomez:jump-to-def-incoherent, r=Urgau

[rustdoc] Fix invalid jump to def link when `#[rustc_allow_incoherent_impl]` is involved

Fixes #163112.

Problem here is that the method is not available in the crate where the type is defined. So `def_path` is actually problematic here as it resolves to the end item, which is not what we want. So instead, I made a simplified version of the `rustc_middle::ty::print::pretty::try_print_visible_def_path_recur` function.

It's also needed for #162808.

r? @Urgau

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) O-linux Operating system: Linux O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants