Repository navigation
docs(fast_io): stop linking public docs at private items - #7618
Merged
Merged
Conversation
The Pages job runs `cargo doc --workspace --all-features --no-deps` with RUSTDOCFLAGS=-D rustdoc::broken_intra_doc_links, and it has been failing on master since a622325: error: unresolved link to `super::send_zc_pipeline::SendZcPipeline` --> crates/fast_io/src/io_uring/mod.rs:117:1 = note: no item named `send_zc_pipeline` in module `fast_io` error: could not document `fast_io` `send_zc_pipeline` is declared `mod`, not `pub mod`, so no path through the public module tree reaches `SendZcPipeline` and the link can never resolve. Four sibling links have the same shape - a public item's doc pointing at an item that is private, `pub(super)`, or in a private module: - send_zc.rs:22 `super::send_zc_pipeline::SendZcPipeline` (the error) - socket_writer.rs:20 `send_zc_pipeline::SendZcPipeline` - socket_writer.rs:308 `SendZcPipeline::drop` - file_writer.rs:37 `super::batching::MIN_RING_BATCH_CHUNKS` - receiver.rs:472,524 `Self::absorb_commit_error` (x2) Each becomes plain backticks instead of an intra-doc link. The prose still names the item for a reader of the source; what it no longer does is ask rustdoc to resolve a path that leads out of the public tree. Making these items public to satisfy the doc tool would widen the crate's API for a formatting reason, and `send_zc_pipeline` in particular is an implementation detail of `socket_writer`. socket_writer.rs:306 already spells the same module name in plain backticks, so this is the file's own existing convention. Measured on Linux with the exact Pages invocation, since `io_uring` is `cfg(all(target_os = "linux", feature = "io_uring"))` and cannot be reached from a macOS `cargo doc` at all: before: EXIT=101, 1 error + 2 fast_io warnings (reproduces the CI failure) after: EXIT=0, zero errors, zero warnings across the whole workspace
`cargo doc` ran in exactly one place - pages.yml, on `push: branches: [master]` - so a broken intra-doc link was discoverable only after it landed and reddened master. Four PRs (#7264, #7489, #7555 and the commit before this one) repaired the same class post-merge. The new job mirrors pages.yml's invocation exactly, RUSTDOCFLAGS included. Matching it is the substance: a divergent flag set would gate a different question than the one Pages actually asks, so a PR could pass here and still redden master. `crates/fast_io/src/io_uring` is `cfg(all(target_os = "linux", feature = "io_uring"))`, so ubuntu plus --all-features is the only combination that compiles the files where the last three occurrences of this class lived. `continue-on-error: true`, matching unsafe-safety-comment-audit: it reports the link before it lands without adding a merge-blocking context to a queue that already carries ~60 checks per PR. Promoting it to a required context is a repo-ruleset change and a separate decision. Ordered second deliberately - the gate is red on the parent commit, and green on this one. tools/ci/check_pr_check_name_uniqueness.py passes: 76 pull_request check names, each with one publisher.
oferchen
added a commit
that referenced
this pull request
Sep 2, 2026
`## [Unreleased]` last covered the #7304-#7522 era. Measured against the 60 most recently merged pull requests, 44 were absent; of the most recent 45, 43 were absent. Nothing from #7574 onward was recorded at all. Each entry is derived from what the pull request actually landed - the merge commit and the body - not from its title. Three cases where those differ: * #7616 ships far more than the doc-alias correction its body describes: the `upstream_version` pin moves to 3.5.0 and `--version` starts naming `quic`, `sd-notify`, `vmsplice` and `send_zc`. * #7618 also adds the pull-request rustdoc-link job its body says was filed separately, which is what closes the master-only-gate recurrence. * #7602's squash carries the closed #7597 as its first commit, so the directory-obstacle half is recorded under #7602. #7587 is deliberately not recorded. Its merge commit is empty: the change had already landed as #7563, which the section already names. Entries extend the existing Keep a Changelog groups and the bold sub-groupings. Clusters that are one story carry one entry with several references: the FERROR_XFER routing and its two-phase drain (#7576, #7581), the connection-FSM close edge and the accept loop that outlives a session error (#7579, #7590), the three detaching daemon suites (#7578, #7588, #7592), the io_uring and SEND_ZC work (#7593, #7600, #7610), the citation retargets (#7601, #7603, #7604), and the accept-loop pin flake (#7615, #7620). Only `## [Unreleased]` is touched; every released section, including the 3.4.4 statements that were correct when written, is byte-identical.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The
Pagesjob on master is red.cargo doc --workspace --all-features --no-depsruns underRUSTDOCFLAGS=-D rustdoc::broken_intra_doc_linksand fails:Root cause
crates/fast_io/src/io_uring/mod.rs:120declaresmod send_zc_pipeline;— private, unlike every sibling in that block. No path through the public module tree reachesSendZcPipeline, so[super::send_zc_pipeline::SendZcPipeline]insend_zc.rs's module doc can never resolve.Four more links share the shape — a public item's doc pointing at an item that is private,
pub(super), or inside a private module. Those emitprivate_intra_doc_linkswarnings rather than the hard error, but they are the same defect:send_zc.rs:22super::send_zc_pipeline::SendZcPipelinesocket_writer.rs:20send_zc_pipeline::SendZcPipelinesocket_writer.rs:308SendZcPipeline::droppub(super)structfile_writer.rs:37super::batching::MIN_RING_BATCH_CHUNKSmod batching+pub(super)constreceiver.rs:472,524Self::absorb_commit_errorThe fix, and why not the other one
Each becomes plain backticks instead of an intra-doc link. The prose still names the item for someone reading the source; it just stops asking rustdoc to resolve a path that leads out of the public tree.
The alternative — making the targets public so the links resolve — would widen the crate's API for a documentation-formatting reason.
send_zc_pipelineis an implementation detail ofsocket_writer, andMIN_RING_BATCH_CHUNKSofbatching.socket_writer.rs:306already spellssend_zc_pipelinein plain backticks two lines above the link being fixed, so this is the file's own existing convention.Verification
io_uringiscfg(all(target_os = "linux", feature = "io_uring")), so a macOScargo docnever compiles these files and cannot reproduce the failure. Measured on Linux (aarch64) with the exactpages.ymlinvocation and environment:Before (pristine
603d101de):After (this branch):
Zero diagnostics across the whole workspace, so the two
transferwarnings CI reported are covered too.Note on recurrence
This is the fourth PR fixing this class (#7264, #7489, #7555, this one).
pages.ymltriggers only onpush: branches: [master], so no PR ever runscargo docand a broken link is only discoverable after it lands. Filed separately; not changed here.