diff options
| author | Lukas Markeffsky <@> | 2022-12-19 15:03:04 +0100 |
|---|---|---|
| committer | Lukas Markeffsky <@> | 2022-12-29 13:31:45 +0100 |
| commit | 50a8ca56be293d34d4754783ba15eb5fb4e20619 (patch) | |
| tree | 57a2e575d549274a8e0355d25adfafafe0cad981 | |
| parent | 11a338ab6644cf454c45d2b41651900610a55b07 (diff) | |
| download | rust-50a8ca56be293d34d4754783ba15eb5fb4e20619.tar.gz rust-50a8ca56be293d34d4754783ba15eb5fb4e20619.zip | |
`./x doc library --open` opens `std`
| -rw-r--r-- | src/bootstrap/doc.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs index 5838049aa5c..3f43c68d2e0 100644 --- a/src/bootstrap/doc.rs +++ b/src/bootstrap/doc.rs @@ -506,7 +506,11 @@ impl Step for Std { // Look for library/std, library/core etc in the `x.py doc` arguments and // open the corresponding rendered docs. for requested_crate in requested_crates { - if STD_PUBLIC_CRATES.iter().any(|k| *k == requested_crate.as_str()) { + if requested_crate == "library" { + // For `x.py doc library --open`, open `std` by default. + let index = out.join("std").join("index.html"); + builder.open_in_browser(index); + } else if STD_PUBLIC_CRATES.iter().any(|&k| k == requested_crate) { let index = out.join(requested_crate).join("index.html"); builder.open_in_browser(index); } |
