Auto merge of #74900 - tmiasko:doc-open, r=Mark-Simulacrum

Fix opening docs for std crates with ./x.py doc --open library/*

The directories for core, alloc, std, proc_macro, and test crates now
correspond directly to the crate name, and stripping the "lib" prefix is
no longer necessary.
This commit is contained in:
bors 2020-07-29 11:19:36 +00:00
commit 06e7b93f6a

View File

@ -460,7 +460,7 @@ impl Step for Std {
// open the corresponding rendered docs.
for path in builder.paths.iter().map(components_simplified) {
if path.get(0) == Some(&"library") {
let requested_crate = &path[1][3..];
let requested_crate = &path[1];
if krates.contains(&requested_crate) {
let index = out.join(requested_crate).join("index.html");
open(builder, &index);