rustdoc fails after interrupting doc generation
Open
Nobody has claimed this yet.
C-bug
T-rustdoc
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
I tried this command:
cargo doc
I then pressed ctrl-c to stop it. I then re-ran it.
I expected to see this happen: It builds the documentation
Instead, this happened:
error: couldn't generate documentation: invalid template: invalid format: should have a newline on the last line
|
= note: failed to create or modify "/home/neikos/projects/software-suite/target/doc/search-index.js"
error: could not document `unicode-ident`
warning: build failed, waiting for other jobs to finish...
error: could not document `smallvec`
error: could not document `thiserror`
Meta
✦ ❯ rustdoc --version --verbose
rustdoc 1.85.0 (4d91de4e4 2025-02-17)
binary: rustdoc
commit-hash: 4d91de4e48198da2e33413efdcd9cd2cc0c46688
commit-date: 2025-02-17
host: x86_64-unknown-linux-gnu
release: 1.85.0
LLVM version: 19.1.7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report by running cargo doc, interrupting it with Ctrl-C, and running it again. Start by examining the generated target/doc/search-index.js mentioned in the error and the reported rustdoc version; done means documentation generation succeeds on the second run without the invalid-template error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100