add option to include private items in library docs
This commit is contained in:
parent
c8e6a9e8b6
commit
bba274fabb
3 changed files with 9 additions and 0 deletions
|
@ -233,6 +233,9 @@ changelog-seen = 2
|
||||||
# and generated in already-minified form from the beginning.
|
# and generated in already-minified form from the beginning.
|
||||||
#docs-minification = true
|
#docs-minification = true
|
||||||
|
|
||||||
|
# Flag to specify whether private items should be included in the library docs.
|
||||||
|
#library-docs-private-items = false
|
||||||
|
|
||||||
# Indicate whether the compiler should be documented in addition to the standard
|
# Indicate whether the compiler should be documented in addition to the standard
|
||||||
# library and facade crates.
|
# library and facade crates.
|
||||||
#compiler-docs = false
|
#compiler-docs = false
|
||||||
|
|
|
@ -65,6 +65,7 @@ pub struct Config {
|
||||||
pub verbose: usize,
|
pub verbose: usize,
|
||||||
pub submodules: Option<bool>,
|
pub submodules: Option<bool>,
|
||||||
pub compiler_docs: bool,
|
pub compiler_docs: bool,
|
||||||
|
pub library_docs_private_items: bool,
|
||||||
pub docs_minification: bool,
|
pub docs_minification: bool,
|
||||||
pub docs: bool,
|
pub docs: bool,
|
||||||
pub locked_deps: bool,
|
pub locked_deps: bool,
|
||||||
|
@ -606,6 +607,7 @@ define_config! {
|
||||||
rustfmt: Option<PathBuf> = "rustfmt",
|
rustfmt: Option<PathBuf> = "rustfmt",
|
||||||
docs: Option<bool> = "docs",
|
docs: Option<bool> = "docs",
|
||||||
compiler_docs: Option<bool> = "compiler-docs",
|
compiler_docs: Option<bool> = "compiler-docs",
|
||||||
|
library_docs_private_items: Option<bool> = "library-docs-private-items",
|
||||||
docs_minification: Option<bool> = "docs-minification",
|
docs_minification: Option<bool> = "docs-minification",
|
||||||
submodules: Option<bool> = "submodules",
|
submodules: Option<bool> = "submodules",
|
||||||
gdb: Option<String> = "gdb",
|
gdb: Option<String> = "gdb",
|
||||||
|
@ -1015,6 +1017,7 @@ impl Config {
|
||||||
config.submodules = build.submodules;
|
config.submodules = build.submodules;
|
||||||
set(&mut config.low_priority, build.low_priority);
|
set(&mut config.low_priority, build.low_priority);
|
||||||
set(&mut config.compiler_docs, build.compiler_docs);
|
set(&mut config.compiler_docs, build.compiler_docs);
|
||||||
|
set(&mut config.library_docs_private_items, build.library_docs_private_items);
|
||||||
set(&mut config.docs_minification, build.docs_minification);
|
set(&mut config.docs_minification, build.docs_minification);
|
||||||
set(&mut config.docs, build.docs);
|
set(&mut config.docs, build.docs);
|
||||||
set(&mut config.locked_deps, build.locked_deps);
|
set(&mut config.locked_deps, build.locked_deps);
|
||||||
|
|
|
@ -597,6 +597,9 @@ fn doc_std(
|
||||||
.arg("--resource-suffix")
|
.arg("--resource-suffix")
|
||||||
.arg(&builder.version)
|
.arg(&builder.version)
|
||||||
.args(extra_args);
|
.args(extra_args);
|
||||||
|
if builder.config.library_docs_private_items {
|
||||||
|
cargo.arg("--document-private-items");
|
||||||
|
}
|
||||||
builder.run(&mut cargo.into());
|
builder.run(&mut cargo.into());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue