Add crate_name method to Rustdoc and Rustc
This commit is contained in:
parent
23e965eb68
commit
4a00debfef
2 changed files with 14 additions and 0 deletions
|
|
@ -176,6 +176,13 @@ impl Rustc {
|
|||
self
|
||||
}
|
||||
|
||||
/// Specify the crate name.
|
||||
pub fn crate_name(&mut self, name: &str) -> &mut Self {
|
||||
self.cmd.arg("--crate-name");
|
||||
self.cmd.arg(name);
|
||||
self
|
||||
}
|
||||
|
||||
/// Get the [`Output`][::std::process::Output] of the finished process.
|
||||
#[track_caller]
|
||||
pub fn command_output(&mut self) -> ::std::process::Output {
|
||||
|
|
|
|||
|
|
@ -114,6 +114,13 @@ impl Rustdoc {
|
|||
self
|
||||
}
|
||||
|
||||
/// Specify the crate name.
|
||||
pub fn crate_name(&mut self, name: &str) -> &mut Self {
|
||||
self.cmd.arg("--crate-name");
|
||||
self.cmd.arg(name);
|
||||
self
|
||||
}
|
||||
|
||||
#[track_caller]
|
||||
pub fn run_fail_assert_exit_code(&mut self, code: i32) -> Output {
|
||||
let caller_location = std::panic::Location::caller();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue