Skip to content

docs(crates): deny missing_docs on the three crates that lacked it - #7614

Merged
oferchen merged 2 commits into
masterfrom
docs/deny-missing-docs
Sep 2, 2026
Merged

oferchen merged 2 commits into
masterfrom
docs/deny-missing-docs

Conversation

@oferchen

@oferchen oferchen commented Sep 1, 2026

Copy link
Copy Markdown
Owner

What

22 of 25 crates carry both #![deny(missing_docs)] and #![deny(rustdoc::broken_intra_doc_links)]. matching, test-support and windows-gnu-eh carried only the broken-link lint, so their public surface had no completeness gate.

This adds the missing lint. Three lines.

This adds no documentation

Measured before changing anything — compiling all three with warn(missing_docs):

crate undocumented public items
matching 0
test-support 0
windows-gnu-eh 0

They were already fully documented. The change converts "currently documented" into "cannot regress", which is the durable form.

Why the zero is a measurement and not an inert probe

A zero from an instrument nobody has falsified is worth nothing. Positive control: plant one undocumented pub fn per crate and re-run —

matching            1
test-support        1
windows-gnu-eh      1
TOTAL               3        INSTRUMENT LIVE

3 for 3. The instrument fires, so the zero is real.

The platform blind spot, closed by compiling rather than reasoning

windows-gnu-eh gates most of its surface behind cfg(all(target_os = "windows", target_env = "gnu")). A macOS or Linux host build never compiles that module, so a host-only measurement is structurally incapable of seeing those items — the exact shape that has bitten this repo before (a CI cell whose package list silently excluded the one crate that mattered).

Verified two independent ways:

  1. Read the source. The two pub unsafe extern "C" fn items (___register_frame_info, ___deregister_frame_info) carry /// docs, as does force_link in both cfg arms.
  2. Compiled the target. cargo check -p windows-gnu-eh --target x86_64-pc-windows-gnu passes with the lint active — and a planted undocumented item on that same target produces error: missing documentation for a function, confirming the lint is live there rather than quietly absent.

Gates

  • cargo fmt --all -- --check — clean
  • cargo check --workspace --all-features --all-targets — clean
  • cargo check -p windows-gnu-eh --target x86_64-pc-windows-gnu — clean, non-vacuity proven above

22 of 25 crates carry both `#![deny(missing_docs)]` and
`#![deny(rustdoc::broken_intra_doc_links)]`. `matching`, `test-support`
and `windows-gnu-eh` carried only the broken-link lint, so their public
surface had no completeness gate.

Measured before changing anything: all three already document every
public item. Compiling them with `warn(missing_docs)` reports **zero**
warnings, so this adds no documentation - it makes the documentation
that already exists impossible to regress.

Non-vacuity: a planted undocumented `pub fn` in each crate is reported,
3 for 3, which is what establishes the zero as a real measurement rather
than an inert probe.

`windows-gnu-eh` gates most of its surface behind
`cfg(all(target_os = "windows", target_env = "gnu"))`, which a host
build never compiles - the exact blind spot that has bitten this repo
before. Verified two ways rather than assumed: the two
`pub unsafe extern "C"` items carry `///` docs (read directly), and
`cargo check -p windows-gnu-eh --target x86_64-pc-windows-gnu` passes
with the lint active, with a planted control on that same target
confirming the lint is live there and not silently absent.

Workspace `cargo check --workspace --all-features --all-targets` and
`cargo fmt --all -- --check` are clean.
@oferchen
oferchen merged commit 606ff8d into master Sep 2, 2026
71 checks passed
@oferchen
oferchen deleted the docs/deny-missing-docs branch September 2, 2026 07:03
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