You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cargo doc --open panics when ran in a crate without any crates with documentation.
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', src/tools/cargo/src/cargo/ops/cargo_doc.rs:23:21
stack backtrace:
0: rust_begin_unwind
at /rustc/928783de663bd855a96f14b2d38c1061603587c6/library/std/src/panicking.rs:498:5
1: core::panicking::panic_fmt
at /rustc/928783de663bd855a96f14b2d38c1061603587c6/library/core/src/panicking.rs:107:14
2: core::panicking::panic_bounds_check
at /rustc/928783de663bd855a96f14b2d38c1061603587c6/library/core/src/panicking.rs:75:5
3: cargo::ops::cargo_doc::doc
4: cargo::commands::doc::exec
5: cargo::cli::execute_subcommand
6: cargo::cli::main
7: cargo::main
Steps
Make a crate with cargo init --lib
Add the following to the Cargo.toml
[lib]
doc = false
Run cargo doc --open
Possible Solution(s)
Cargo doc should print an error about not having any crates with documentation
Notes
It also errors with a crate with a binary with no docs, but I assume fixing one will fix the other.
Problem
cargo doc --open
panics when ran in a crate without any crates with documentation.Steps
cargo init --lib
cargo doc --open
Possible Solution(s)
Cargo doc should print an error about not having any crates with documentation
Notes
It also errors with a crate with a binary with no docs, but I assume fixing one will fix the other.
Version
The text was updated successfully, but these errors were encountered: