diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-12-29 18:24:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-29 18:24:30 +0100 |
| commit | 10374d3807e18ff5a62699c7700a08d0cb647d1e (patch) | |
| tree | fe2be0dc046500b67214f3c4fa40fa152926e4d0 /src | |
| parent | 81c2b7280fd78b0bc780f382c9cf12ace244e3dc (diff) | |
| parent | 50a8ca56be293d34d4754783ba15eb5fb4e20619 (diff) | |
| download | rust-10374d3807e18ff5a62699c7700a08d0cb647d1e.tar.gz rust-10374d3807e18ff5a62699c7700a08d0cb647d1e.zip | |
Rollup merge of #105899 - lukas-code:stage-1-docs, r=jyn514
`./x doc library --open` opens `std` fix https://github.com/rust-lang/rust/issues/105898
Diffstat (limited to 'src')
| -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); } |
