Skip to content

Commit c04d09a

Browse files
Rename run-make-support library output method to command_output
1 parent 3c2cf2e commit c04d09a

File tree

8 files changed

+13
-12
lines changed

8 files changed

+13
-12
lines changed

src/tools/run-make-support/src/cc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl Cc {
7373
}
7474

7575
/// Get the [`Output`][::std::process::Output] of the finished process.
76-
pub fn output(&mut self) -> ::std::process::Output {
76+
pub fn command_output(&mut self) -> ::std::process::Output {
7777
self.cmd.output().expect("failed to get output of finished process")
7878
}
7979
}

src/tools/run-make-support/src/clang.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl Clang {
7272
}
7373

7474
/// Get the [`Output`][::std::process::Output] of the finished process.
75-
pub fn output(&mut self) -> ::std::process::Output {
75+
pub fn command_output(&mut self) -> ::std::process::Output {
7676
self.cmd.output().expect("failed to get output of finished process")
7777
}
7878
}

src/tools/run-make-support/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ pub fn set_host_rpath(cmd: &mut Command) {
164164
///
165165
/// impl CommandWrapper {
166166
/// /// Get the [`Output`][::std::process::Output] of the finished process.
167-
/// pub fn output(&mut self) -> Output { /* ... */ } // <- required `output()` method
167+
/// pub fn command_output(&mut self) -> Output { /* ... */ } // <- required `command_output()` method
168168
/// }
169169
///
170170
/// crate::impl_common_helpers!(CommandWrapper);
@@ -242,7 +242,7 @@ macro_rules! impl_common_helpers {
242242
let caller_location = ::std::panic::Location::caller();
243243
let caller_line_number = caller_location.line();
244244

245-
let output = self.output();
245+
let output = self.command_output();
246246
if !output.status.success() {
247247
handle_failed_output(&self.cmd, output, caller_line_number);
248248
}
@@ -255,7 +255,7 @@ macro_rules! impl_common_helpers {
255255
let caller_location = ::std::panic::Location::caller();
256256
let caller_line_number = caller_location.line();
257257

258-
let output = self.output();
258+
let output = self.command_output();
259259
if output.status.success() {
260260
handle_failed_output(&self.cmd, output, caller_line_number);
261261
}

src/tools/run-make-support/src/llvm_readobj.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl LlvmReadobj {
4444

4545
/// Get the [`Output`][::std::process::Output] of the finished process.
4646
#[track_caller]
47-
pub fn output(&mut self) -> ::std::process::Output {
47+
pub fn command_output(&mut self) -> ::std::process::Output {
4848
self.cmd.output().expect("failed to get output of finished process")
4949
}
5050
}

src/tools/run-make-support/src/rustc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ impl Rustc {
171171

172172
/// Get the [`Output`][::std::process::Output] of the finished process.
173173
#[track_caller]
174-
pub fn output(&mut self) -> ::std::process::Output {
174+
pub fn command_output(&mut self) -> ::std::process::Output {
175175
// let's make sure we piped all the input and outputs
176176
self.cmd.stdin(Stdio::piped());
177177
self.cmd.stdout(Stdio::piped());
@@ -196,7 +196,7 @@ impl Rustc {
196196
let caller_location = std::panic::Location::caller();
197197
let caller_line_number = caller_location.line();
198198

199-
let output = self.output();
199+
let output = self.command_output();
200200
if output.status.code().unwrap() != code {
201201
handle_failed_output(&self.cmd, output, caller_line_number);
202202
}

src/tools/run-make-support/src/rustdoc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl Rustdoc {
7373

7474
/// Get the [`Output`][::std::process::Output] of the finished process.
7575
#[track_caller]
76-
pub fn output(&mut self) -> ::std::process::Output {
76+
pub fn command_output(&mut self) -> ::std::process::Output {
7777
// let's make sure we piped all the input and outputs
7878
self.cmd.stdin(Stdio::piped());
7979
self.cmd.stdout(Stdio::piped());
@@ -105,7 +105,7 @@ impl Rustdoc {
105105
let caller_location = std::panic::Location::caller();
106106
let caller_line_number = caller_location.line();
107107

108-
let output = self.output();
108+
let output = self.command_output();
109109
if output.status.code().unwrap() != code {
110110
handle_failed_output(&self.cmd, output, caller_line_number);
111111
}

tests/run-make/CURRENT_RUSTC_VERSION/rmake.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ fn main() {
1313
let mut stable_path = PathBuf::from(env!("TMPDIR"));
1414
stable_path.push("libstable.rmeta");
1515

16-
let output = rustc().input("main.rs").emit("metadata").extern_("stable", &stable_path).output();
16+
let output =
17+
rustc().input("main.rs").emit("metadata").extern_("stable", &stable_path).command_output();
1718

1819
let stderr = String::from_utf8_lossy(&output.stderr);
1920
let version = include_str!(concat!(env!("S"), "/src/version"));

tests/run-make/wasm-abi/rmake.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn run(file: &Path, method: &str, expected_output: &str) {
2525
.arg("--invoke")
2626
.arg(method)
2727
.arg(file)
28-
.output()
28+
.command_output()
2929
.unwrap();
3030
assert!(output.status.success());
3131
assert_eq!(expected_output, String::from_utf8_lossy(&output.stdout));

0 commit comments

Comments
 (0)