Skip to content

mirth-lab rustdoc-diff (check 6): rustdoc consistency; findings 33-39 - #34

Merged
zmaril merged 4 commits into
mainfrom
mirth/check-rustdoc
Oct 10, 2026
Merged

zmaril merged 4 commits into
mainfrom
mirth/check-rustdoc

Conversation

@zmaril

@zmaril zmaril commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Check 6 of docs/checks.md, rustdoc consistency. The new subcommand is mirth-lab rustdoc-diff.

What it checks

For each standalone UI test, it runs rustdoc (nightly-2026-10-06, the same commit as the campaign rustc) next to rustc --emit=metadata. rustdoc runs four ways: HTML, HTML with private items, JSON, and JSON with private items.

  • ice: rustdoc panics, on any test.
  • rejects: rustdoc reports an error on a test rustc accepts.
  • json: an id reachable from the root is in neither index nor paths. These are the same rules src/tools/jsondoclint applies.
  • reexport: a root pub use is missing from the root module.
  • auto-trait: for each synthesized auto-trait impl (Send, Sync, Unpin, UnwindSafe, RefUnwindSafe), a probe appended to the test requires the trait under exactly the bounds rustdoc shows. rustc must accept the probe, or reject it with E0277 for a negative impl (#162274).

Full sweep

  • Tests: 18,624. rustc accepts 7,473 and rejects 10,969; 207 were skipped.
  • Probes: 4,562 auto-trait probes in 577 tests.
  • Results: 19 tests with findings, giving 7 findings (33–39). Facts and reduced tests are under docs/hunt/.
# finding
33 rustdoc panics on use {{}};, which rustc accepts. A regression on nightly-2026-09-26; the range contains #161349.
34 rustdoc skips rustc's post-parse option adjustments. -Ccodegen-units is ignored, and -Zassumptions-on-binders with -Znext-solver=no causes an ICE.
35 rustdoc rejects an associated-const binding rustc accepts. The cause is the FIXME(generic_const_items) in clean_hir_term.
36 rustdoc panics on an associated-const binding through a supertrait.
37 rustdoc fails with E0080 on a type alias whose array length does not evaluate.
38 rustdoc ICEs on delayed bugs whose real error comes from a step it skips. One case is stable: a static too large for the target.
39 rustdoc JSON: an impl in a function body names a body-local type, and its id dangles even with private items.

These are labelled and not reported:

  • rustdoc lints denied by a test, and tiny recursion limits.
  • Dangling ids for stripped items, which are open upstream (#113674 family).
  • The #155728 fn_delegation ICE.
  • The unsafe_binder JSON FIXME.

No re-export was missing, and no auto-trait impl was contradicted by its probe.

Also adds rustdoc-diff to rustc/big-run.sh and documents how to run it.

The finding numbers 33–39 may collide with other check branches opened at the same time. Renumber at merge if needed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT

zmaril and others added 4 commits October 10, 2026 09:34
…what it accepts, no ICE), its JSON holds together (reachable ids resolve), root re-exports appear, and auto-trait impls hold under the bounds shown (probes)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
…s about the auto trait; pass #![crate_type] as --crate-type (rustdoc does not read the attribute)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
…every edition; a probe compile with other errors gives no verdict; -Zparse-crate-root-only tests skipped; known rustdoc ICE #155728 labelled

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
… with facts and reduced tests; known classes labelled; big-run and docs

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXiEXbESemwqMLYKaWLDbT
@zmaril
zmaril merged commit 5b2e54a into main Oct 10, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant