Skip to content

Commit 50a8ca5

Browse files
author
Lukas Markeffsky
committedDec 29, 2022
./x doc library --open opens std
1 parent 11a338a commit 50a8ca5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎src/bootstrap/doc.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,11 @@ impl Step for Std {
506506
// Look for library/std, library/core etc in the `x.py doc` arguments and
507507
// open the corresponding rendered docs.
508508
for requested_crate in requested_crates {
509-
if STD_PUBLIC_CRATES.iter().any(|k| *k == requested_crate.as_str()) {
509+
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) {
510514
let index = out.join(requested_crate).join("index.html");
511515
builder.open_in_browser(index);
512516
}

0 commit comments

Comments
 (0)
Please sign in to comment.