Skip to content

Commit 4057a7b

Browse files
Add library_search_path to Rustdoc
1 parent eea00ca commit 4057a7b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: src/tools/run-make-support/src/rustdoc.rs

+8
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,14 @@ impl Rustdoc {
143143
self
144144
}
145145

146+
/// Add a directory to the library search path. It corresponds to the `-L`
147+
/// rustdoc option.
148+
pub fn library_search_path<P: AsRef<Path>>(&mut self, path: P) -> &mut Self {
149+
self.cmd.arg("-L");
150+
self.cmd.arg(path.as_ref());
151+
self
152+
}
153+
146154
#[track_caller]
147155
pub fn run_fail_assert_exit_code(&mut self, code: i32) -> Output {
148156
let caller_location = std::panic::Location::caller();

0 commit comments

Comments
 (0)