Skip to content

Commit

Permalink
Merge pull request #1430 from crlf0710/patch-1
Browse files Browse the repository at this point in the history
Add "rustup doc --reference"
  • Loading branch information
Diggsey authored Jun 9, 2018
2 parents 5c494e8 + b69c6a0 commit dbbd83f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/rustup-cli/rustup_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,12 @@ pub fn cli() -> App<'static, 'static> {
.long("std")
.help("Standard library API documentation"),
)
.group(ArgGroup::with_name("page").args(&["book", "std"])),
.arg(
Arg::with_name("reference")
.long("reference")
.help("The Rust Reference"),
)
.group(ArgGroup::with_name("page").args(&["book", "std", "reference"])),
);

if cfg!(not(target_os = "windows")) {
Expand Down Expand Up @@ -918,6 +923,8 @@ fn doc(cfg: &Cfg, m: &ArgMatches) -> Result<()> {
"book/index.html"
} else if m.is_present("std") {
"std/index.html"
} else if m.is_present("reference") {
"reference/index.html"
} else {
"index.html"
};
Expand Down

0 comments on commit dbbd83f

Please sign in to comment.