-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustdoc exits with an error on crate-level #![doc(hidden)]
#109695
Comments
Thanks for the report! This appears to be an issue with rustdoc, and its issue tracker lives here. |
Putting
What does this mean? docs.rs intentionally does not have an opt-out mechanism: rust-lang/docs.rs#125 |
!#[doc(hidden)]
!#[doc(hidden)]
#![doc(hidden)]
Thanks for the quick reply!
Yes, I also think so. In my opinion, an empty docs page (or something similar) or a better error, both might have sense
I first opened an issue to this crate, so I link to it so you can have more context: taiki-e/cargo-llvm-cov#248 |
I personally think it's an acceptable behaviour. It'll just create an empty documentation and that's it. Seems like a weird use case indeed though. I opened #109726 which fixes the rustdoc crash in the meantime (which therefore generates empty documentation). |
…=notriddle rustdoc: Don't strip crate module Until we decide something for rust-lang#109695, rustdoc won't crash anymore because the crate folder doesn't exist. r? `@notriddle`
Problem
Hi, I found a possible bug (or at least, bad error message) while generating documentation for a library with
#![doc(hidden)]
. The use case is a library with private documentation published to crates.io. The docs page is generated and failing. In the docs page you see all broken but no documentation is intended.(It's a third party crate so I don't have decision on having no documentation)
The error thrown by
cargo doc
is somewhat obscure, as hiding docs is intentional:(Full paths have been trimmed)
I'd expect docs to be generated and either an empty docs page or with a simple message indicating this crate has no/hidden docs.
Steps
src/lib.rs
and add a#![doc(hidden)]
in the beginning of the file.cargo doc
.Possible Solution(s)
I'd expect something like either generating an empty docs page or with a simple message indicating docs are hidden for this crate.
Notes
No response
Version
The text was updated successfully, but these errors were encountered: