Add Rustdoc::output_format · rust-lang/rust@f0ab814 (original) (raw)

File tree

1 file changed

lines changed

1 file changed

lines changed

Original file line number Diff line number Diff line change
@@ -151,6 +151,13 @@ impl Rustdoc {
151 151 self
152 152 }
153 153
154 +/// Specify the output format.
155 + pub fn output_format(&mut self, format: &str) -> &mut Self {
156 +self.cmd.arg("--output-format");
157 +self.cmd.arg(format);
158 +self
159 +}
160 +
154 161 #[track_caller]
155 162 pub fn run_fail_assert_exit_code(&mut self, code: i32) -> Output {
156 163 let caller_location = std::panic::Location::caller();