Skip to content

docs: resolve the four rustdoc links breaking the Pages build - #7555

Merged
oferchen merged 1 commit into
masterfrom
fix/rustdoc-unresolved-links
Aug 28, 2026
Merged

oferchen merged 1 commit into
masterfrom
fix/rustdoc-unresolved-links

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Master's Pages workflow has been failing. cargo doc runs with -D warnings, so an unresolved intra-doc link fails the job outright.

Four links, two causes:

crates/engine/src/delete/emitter/fs.rs:170,294 — the module is itself named fs, so [`fs::remove_file`] resolves against that module, not std::fs, and finds no such item. Both now name std::fs explicitly.

crates/fast_io/src/owner_walk.rs:847,884 — operator_open_create_new and operator_open_recv are public and link to operator_open_with, which is private; rustdoc rejects a public item linking to a private one. Both become plain backticks, matching what the surrounding docs already do for items that are named but not linkable.

Verified with the same invocation the workflow uses:

RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --all-features
    Finished `dev` profile [unoptimized + debuginfo] target(s)

Zero errors, zero warnings. Docs-only; no code path changes.

`cargo doc` runs with `-D warnings`, so every unresolved intra-doc link
fails the job. Master has been red on Pages since these landed.

`engine`'s delete emitter is itself a module named `fs`, so `[`fs::…`]`
resolves against that module rather than `std::fs` and finds nothing -
both links now name `std::fs` explicitly.

`fast_io`'s two `operator_open_*` docs link to `operator_open_with`,
which is private; a public item cannot link to it. They become plain
backticks, which is what the surrounding docs already use for items that
are named but not linkable.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 28, 2026
@oferchen
oferchen merged commit 8405314 into master Aug 28, 2026
72 checks passed
@oferchen
oferchen deleted the fix/rustdoc-unresolved-links branch August 28, 2026 04:15
oferchen added a commit that referenced this pull request Sep 2, 2026
`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
* docs(fast_io): stop linking public docs at private items

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

* ci: run the rustdoc link check on pull requests

`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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant