Skip to content

build: rustdoc warnings pile up because CI never runs cargo doc #917

Open

Description

@bpowers

cargo doc --workspace --no-deps prints rustdoc warnings (108 when counted in July, 101 of them in simlin-engine), and nothing in pre-commit or CI runs cargo doc, so the count only grows.
The current count has not been re-measured; some of the specific broken links listed in July are gone.

Example

The warnings in July fell into four kinds:

  • Broken links (39): mostly array notation in prose that rustdoc reads as a link, such as name[dims] or x[0], plus a few links to error codes and types that were renamed.
    Fix by wrapping in backticks.
  • Links from public docs to private items (50), such as LTM and conveyor helpers.
  • Invalid HTML tags (10): 8 in the prost-generated project_io.gen.rs, which cannot be edited by hand; 2 in xmile/model.rs.
  • Redundant explicit links (2).

Why it matters

Broken links render as literal [Foo] text, so cross-references in the docs do nothing.
None of these crates is published, so the docs are read in an editor or a local cargo doc, which limits the cost.

Fix

Allow rustdoc::private_intra_doc_links at the crate roots (these crates are not a public API, so linking to private items is fine), add #[allow(rustdoc::invalid_html_tags)] on the mod project_io declaration in lib.rs, fix the rest by hand, and add a CI step running RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps.
Keep it out of the pre-commit hook, which is already near its time cap.

Alternative: resolve each private link one by one (make the item public or drop the link); more work for little reader benefit.

Pointers

  • src/simlin-engine/src/lib.rs (#[path = "project_io.gen.rs"])
  • .github/workflows/ci.yaml

Activity

  1. changed the title [-]build: 108 rustdoc warnings workspace-wide with no CI gate on `cargo doc`[/-] [+]build: rustdoc warnings pile up because CI never runs cargo doc[/+] on Oct 12, 2026
  2. added
    docs
    ci
    hygiene
    on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cidocshygiene

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions