Skip to content

fix(docs): clear all rustdoc errors under -D warnings#191

Merged
WaylandYang merged 1 commit into
mainfrom
fix/rustdoc-warnings
May 29, 2026
Merged

fix(docs): clear all rustdoc errors under -D warnings#191
WaylandYang merged 1 commit into
mainfrom
fix/rustdoc-warnings

Conversation

@WaylandYang
Copy link
Copy Markdown
Contributor

Summary

Full-workspace audit (`cargo doc --document-private-items` + `RUSTDOCFLAGS=-D warnings`) turned up 16+ errors. None are runtime bugs but they break the published rustdoc — clicking any of the broken intra-doc links gives a 404, and the angle-bracketed CLI placeholders render as raw `` text.

Categories fixed:

  • 2 new errors from PR feat(vmm): Phase 6.1 — Vm::snapshot_vmstate_only + VmstateOnly FC patch #190's `snapshot_vmstate_only` doc: `[snapshot_to]` / `[snapshot_diff_to]` intra-doc links need the `Self::` prefix.
  • 11+ pre-existing angle-bracket-as-HTML errors across `crates/forkd-cli/src/main.rs` and `crates/forkd-cli/src/hub.rs`: wrap the subcommand listing in a `text` code fence; backtick individual placeholders in arg-help strings.
  • 1 unresolved-link `[:ro]` after `HOST_FILE:GUEST_PATH` — wrap whole format string in backticks.
  • 1 'this URL is not a hyperlink' — convert bare `https://forkd-hub.deeplethe.com\` to an autolink with `<...>`.
  • 1 dangling intra-doc link `[\DESIGN-v0.4.md\\]` in v0.4 PoC — switch to plain prose.

Test plan

  • `cargo doc --workspace --no-deps --document-private-items` with `RUSTDOCFLAGS='-D warnings'` — exit 0
  • `cargo fmt --all --check` — exit 0
  • `cargo clippy --workspace --all-targets --all-features -- -D warnings` — exit 0
  • `cargo test --workspace --all-features` — 85 passed, 0 failed

Full-workspace audit (cargo doc --document-private-items + RUSTDOCFLAGS=-D warnings)
turned up 16+ unresolved-link / unclosed-HTML-tag errors. None are
runtime bugs but they break the published rustdoc:

  - 2 fresh errors from PR #190's snapshot_vmstate_only doc
    comment: `[snapshot_to]` / `[snapshot_diff_to]` intra-doc links
    didn't resolve because rustdoc needs the `Self::` prefix when
    pointing at sibling methods. Use `Self::snapshot_to`.

  - 11+ pre-existing errors in crates/forkd-cli/src/main.rs:
    angle-bracketed CLI placeholders (`<name>`, `<path>`, `<file>`,
    `<sanitized-tag>`, `<image-slug>`, `<tag>`) were treated as
    unclosed HTML tags. Wrap the affected subcommand-listing block
    in a `text` code fence; individually backtick the remaining
    placeholders in arg docs (`/tmp/forkd-parent-<tag>/`,
    `~/.local/share/forkd/snapshots/<tag>/`, etc.).

  - 1 error: bare `[:ro]` after `HOST_FILE:GUEST_PATH` parsed as
    an intra-doc link with empty target. Wrap the whole format
    string in backticks.

  - 1 error: bare `https://forkd-hub.deeplethe.com.` got flagged
    "this URL is not a hyperlink". Wrap in angle brackets so
    rustdoc treats it as an autolink.

  - 1 error: `[`DESIGN-v0.4.md`]` in the kvm-uffd-wp PoC was a
    dangling intra-doc link. Switch to plain prose reference.

  - 1 error: angle brackets in hub.rs MetaJson doc comment for
    parent_tag.

Verified: `cargo doc -D warnings` exit 0, fmt/clippy/test all
still pass (85 tests, 0 failures).
@WaylandYang WaylandYang merged commit b70ff83 into main May 29, 2026
2 checks passed
@WaylandYang WaylandYang deleted the fix/rustdoc-warnings branch May 29, 2026 08:56
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