Rollup merge of #44989 - QuietMisdreavus:what-is-your-quest, r=GuillaumeGomez
let rustdoc print the crate version into docs This PR adds a new unstable flag to rustdoc, `--crate-version`, which when present will add a new entry to the sidebar of the root module, printing the given version number:  Closes #24336 (The WIP status is because i don't want to merge this until i can get the std docs to use it, which i need help from rustbuild people to make sure i get right.)
This commit is contained in:
commit
445bbde784
7 changed files with 57 additions and 1 deletions
|
|
@ -112,6 +112,7 @@ impl<T: Clean<U>, U> Clean<Vec<U>> for P<[T]> {
|
|||
#[derive(Clone, Debug)]
|
||||
pub struct Crate {
|
||||
pub name: String,
|
||||
pub version: Option<String>,
|
||||
pub src: PathBuf,
|
||||
pub module: Option<Item>,
|
||||
pub externs: Vec<(CrateNum, ExternalCrate)>,
|
||||
|
|
@ -183,6 +184,7 @@ impl<'a, 'tcx> Clean<Crate> for visit_ast::RustdocVisitor<'a, 'tcx> {
|
|||
|
||||
Crate {
|
||||
name,
|
||||
version: None,
|
||||
src,
|
||||
module: Some(module),
|
||||
externs,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue