We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6265286 commit cc44ce0Copy full SHA for cc44ce0
src/bootstrap/doc.rs
@@ -479,12 +479,16 @@ impl Step for Std {
479
// Look for library/std, library/core etc in the `x.py doc` arguments and
480
// open the corresponding rendered docs.
481
for path in builder.paths.iter().map(components_simplified) {
482
- if path.get(0) == Some(&"library") {
483
- let requested_crate = &path[1];
484
- if krates.contains(&requested_crate) {
485
- let index = out.join(requested_crate).join("index.html");
486
- open(builder, &index);
487
- }
+ let requested_crate = if path.get(0) == Some(&"library") {
+ &path[1]
+ } else if !path.is_empty() {
+ &path[0]
+ } else {
+ continue;
488
+ };
489
+ if krates.contains(&requested_crate) {
490
+ let index = out.join(requested_crate).join("index.html");
491
+ open(builder, &index);
492
}
493
494
0 commit comments