-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Rust book documentation does not mention "crate documentation" #34329
Comments
https://doc.rust-lang.org/book/documentation.html#documenting-modules does mention it, but does not say "crate". Crates have a root module, and that's what the error refers to. |
I saw that, guessed that, and it fixed it. It just confused me a bit that the error talks about crate documentation (instead of saying missing documentation for the root module of the crate ...) and In the snippet of code in the docs (the second one for the root module) it just shows the comment, so it wasn't 100% clear to me that the comment is just supposed to float somewhere on the top level of the file. I think both things could be a bit more clear and a bit more in sync (so it might make sense to label for error messages as well). |
I would be happy to work with anyone who wants to tackle this issue. |
@steveklabnik I will try to work on this one. From what I understand, the Documenting Modules part in the rust book should be more explicit about root module and that the module documentation is at the very beginning of the file. Also, the error should mention |
Well, the error is fine, as you are missing documentation for the crate. I think, rather than extending "Documenting modules", a new small section for "Crate documentation" is the way to go, since that's the problem that's trying to be solved. In there, we could explicitly say "You document a crate by putting an inner doc comment ( Sound good? |
Sounds good to me! |
@steveklabnik @gnzlbg Something like that #34667 ? |
…tion, r=Manishearth Add a section about crate documentation. Fixes rust-lang#34329 ?r @steveklabnik
…tion, r=Manishearth Add a section about crate documentation. Fixes rust-lang#34329 ?r @steveklabnik
I just enabled
#![deny(missing_docs)]
and I get:The section of the book on documentation, however, does not mention anything about "crate documentation" or how to add it.
The text was updated successfully, but these errors were encountered: