From 23e965eb68f5e903cbcb3bf86ca3431e4c272586 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 11 May 2024 20:31:07 +0200 Subject: [PATCH] Add `crate_type` method to `Rustdoc` --- src/tools/run-make-support/src/rustdoc.rs | 7 +++++++ 1 file changed, 7 insertions(+) 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();