Skip to content

Commit 9ae4e3e

Browse files
committed
Make use of sysroot in librustdoc/config.rs for builtin:$path
1 parent 9154757 commit 9ae4e3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/librustdoc/config.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -623,11 +623,12 @@ impl Options {
623623
}
624624

625625
let target = parse_target_triple(early_dcx, matches);
626+
let maybe_sysroot = matches.opt_str("sysroot").map(PathBuf::from);
626627

627628
let libs = matches
628629
.opt_strs("L")
629630
.iter()
630-
.map(|s| SearchPath::from_cli_opt(None, &target, early_dcx, s))
631+
.map(|s| SearchPath::from_cli_opt(maybe_sysroot.as_deref(), &target, early_dcx, s))
631632
.collect();
632633

633634
let show_coverage = matches.opt_present("show-coverage");
@@ -657,7 +658,6 @@ impl Options {
657658
let bin_crate = crate_types.contains(&CrateType::Executable);
658659
let proc_macro_crate = crate_types.contains(&CrateType::ProcMacro);
659660
let playground_url = matches.opt_str("playground-url");
660-
let maybe_sysroot = matches.opt_str("sysroot").map(PathBuf::from);
661661
let module_sorting = if matches.opt_present("sort-modules-by-appearance") {
662662
ModuleSorting::DeclarationOrder
663663
} else {

0 commit comments

Comments
 (0)