diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-05-11 20:31:07 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-05-11 21:09:00 +0200 |
| commit | 23e965eb68f5e903cbcb3bf86ca3431e4c272586 (patch) | |
| tree | 66c503934573a8e2ba0de493018aaa7d50b34eaf | |
| parent | be7549f82c194c7a5dc8f34ed0541bfebbaf33ea (diff) | |
| download | rust-23e965eb68f5e903cbcb3bf86ca3431e4c272586.tar.gz rust-23e965eb68f5e903cbcb3bf86ca3431e4c272586.zip | |
Add `crate_type` method to `Rustdoc`
| -rw-r--r-- | src/tools/run-make-support/src/rustdoc.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tools/run-make-support/src/rustdoc.rs b/src/tools/run-make-support/src/rustdoc.rs index aa3c7dcf0e3..dcd5b5a93e1 100644 --- a/src/tools/run-make-support/src/rustdoc.rs +++ b/src/tools/run-make-support/src/rustdoc.rs @@ -107,6 +107,13 @@ impl Rustdoc { self } + /// Specify the crate type. + pub fn crate_type(&mut self, crate_type: &str) -> &mut Self { + self.cmd.arg("--crate-type"); + self.cmd.arg(crate_type); + self + } + #[track_caller] pub fn run_fail_assert_exit_code(&mut self, code: i32) -> Output { let caller_location = std::panic::Location::caller(); |
