We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 81c2b72 + 50a8ca5 commit 10374d3Copy full SHA for 10374d3
src/bootstrap/doc.rs
@@ -506,7 +506,11 @@ impl Step for Std {
506
// Look for library/std, library/core etc in the `x.py doc` arguments and
507
// open the corresponding rendered docs.
508
for requested_crate in requested_crates {
509
- if STD_PUBLIC_CRATES.iter().any(|k| *k == requested_crate.as_str()) {
+ if requested_crate == "library" {
510
+ // For `x.py doc library --open`, open `std` by default.
511
+ let index = out.join("std").join("index.html");
512
+ builder.open_in_browser(index);
513
+ } else if STD_PUBLIC_CRATES.iter().any(|&k| k == requested_crate) {
514
let index = out.join(requested_crate).join("index.html");
515
builder.open_in_browser(index);
516
}
0 commit comments