Docs: rustdoc builds the formats and loader crates without warnings #272

Closed
github-bot wants to merge 1 commit from gh-pr/272/head into gh-pr/272/base
Owner

@⁠SkippySteve on GitHub · 2026-11-24 01:58 UTC · original
SkippySteve/victory-pr-own-next11 → main · +2 −2 · 2 files · 1 commits · closed without merging

cargo doc --no-deps warns twice on main, in crates that document on any host:

warning: public documentation for `texture` links to private item `MICRO`
  --> crates/victory-formats/src/texture.rs:16:19
warning: `prepare` is both a function and a module
 --> crates/victory-loader/src/lib.rs:7:10
  • texture.rs: MICRO is a private table, so the public module page can't link to it. It stays in code font, without the link.
  • loader lib.rs: step 1 of the overview refers to the function, so the link is now [`prepare()`]. rustdoc resolves it to the function and no longer has to choose between the function and the prepare module.

The change is two comment lines. No code changes.

Testing (Linux)

  • RUSTDOCFLAGS="-D warnings" cargo doc --no-deps -p victory-core -p victory-pe -p victory-loader -p victory-formats -p victory-pipeline -p victory-game -p victory-shader passes. On main it fails on the two warnings above.
  • cargo clippy -p victory-formats -p victory-loader --all-targets -- -D warnings is clean.
  • cargo test -p victory-formats: 20 passed, 3 ignored.
  • cargo test -p victory-loader: the three prepare::tests that parse the test's own binary fail on Linux, both here and on main ("Unknown file magic", because that binary is ELF). This PR doesn't touch them.
**@⁠SkippySteve** on GitHub · 2026-11-24 01:58 UTC · [original](https://github.com/Marvisak/VIctory/pull/272) `SkippySteve/victory-pr-own-next11` → `main` · +2 −2 · 2 files · 1 commits · closed without merging `cargo doc --no-deps` warns twice on main, in crates that document on any host: ``` warning: public documentation for `texture` links to private item `MICRO` --> crates/victory-formats/src/texture.rs:16:19 warning: `prepare` is both a function and a module --> crates/victory-loader/src/lib.rs:7:10 ``` - **texture.rs:** `MICRO` is a private table, so the public module page can't link to it. It stays in code font, without the link. - **loader lib.rs:** step 1 of the overview refers to the function, so the link is now `` [`prepare()`] ``. rustdoc resolves it to the function and no longer has to choose between the function and the `prepare` module. The change is two comment lines. No code changes. ### Testing (Linux) - `RUSTDOCFLAGS="-D warnings" cargo doc --no-deps -p victory-core -p victory-pe -p victory-loader -p victory-formats -p victory-pipeline -p victory-game -p victory-shader` passes. On main it fails on the two warnings above. - `cargo clippy -p victory-formats -p victory-loader --all-targets -- -D warnings` is clean. - `cargo test -p victory-formats`: 20 passed, 3 ignored. - `cargo test -p victory-loader`: the three `prepare::tests` that parse the test's own binary fail on Linux, both here and on main ("Unknown file magic", because that binary is ELF). This PR doesn't touch them.
cargo doc --no-deps warns twice on main for crates that document on any
host:

    warning: public documentation for `texture` links to private item `MICRO`
      --> crates/victory-formats/src/texture.rs:16:19
    warning: `prepare` is both a function and a module
     --> crates/victory-loader/src/lib.rs:7:10

MICRO is a private table, so the public page cannot link to it; it stays
named in code font. In the loader's overview, step 1 means the function,
so the link says prepare() and rustdoc resolves it there instead of
guessing between it and the module.

With both, RUSTDOCFLAGS="-D warnings" cargo doc --no-deps passes for
victory-core, -pe, -loader, -formats, -pipeline, -game and -shader.
Comments only; no code changes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:57:29 +00:00
github-bot closed this pull request 2026-11-26 03:57:29 +00:00
Author
Owner

@⁠SkippySteve on GitHub · 2026-11-24 02:27 UTC · original

Superseded by #315, which now includes this rustdoc fix (same texture.rs).

**@⁠SkippySteve** on GitHub · 2026-11-24 02:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/272#issuecomment-7120170171) Superseded by #315, which now includes this rustdoc fix (same `texture.rs`).

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!272
No description provided.