Skip to content

Commit a443dc4

Browse files
committed
run_make_support: rename env_checked -> env
1 parent b7f7205 commit a443dc4

File tree

8 files changed

+10
-11
lines changed

8 files changed

+10
-11
lines changed

src/tools/run-make-support/src/env_checked.rs renamed to src/tools/run-make-support/src/env.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
use std::env;
21
use std::ffi::OsString;
32

43
#[track_caller]
54
#[must_use]
65
pub fn env_var(name: &str) -> String {
7-
match env::var(name) {
6+
match std::env::var(name) {
87
Ok(v) => v,
98
Err(err) => panic!("failed to retrieve environment variable {name:?}: {err:?}"),
109
}
@@ -13,7 +12,7 @@ pub fn env_var(name: &str) -> String {
1312
#[track_caller]
1413
#[must_use]
1514
pub fn env_var_os(name: &str) -> OsString {
16-
match env::var_os(name) {
15+
match std::env::var_os(name) {
1716
Some(v) => v,
1817
None => panic!("failed to retrieve environment variable {name:?}"),
1918
}

src/tools/run-make-support/src/external_deps/llvm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::path::{Path, PathBuf};
22

33
use crate::command::Command;
4-
use crate::env_checked::env_var;
4+
use crate::env::env_var;
55

66
/// Construct a new `llvm-readobj` invocation with the `GNU` output style.
77
/// This assumes that `llvm-readobj` is available at `$LLVM_BIN_DIR/llvm-readobj`.

src/tools/run-make-support/src/external_deps/python.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::command::Command;
2-
use crate::env_checked::env_var;
2+
use crate::env::env_var;
33

44
/// Obtain path of python as provided by the `PYTHON` environment variable. It is up to the caller
55
/// to document and check if the python version is compatible with its intended usage.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::ffi::{OsStr, OsString};
22
use std::path::Path;
33

44
use crate::command::Command;
5-
use crate::env_checked::env_var;
5+
use crate::env::env_var;
66
use crate::path_helpers::cwd;
77
use crate::util::set_host_rpath;
88

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::ffi::OsStr;
22
use std::path::Path;
33

44
use crate::command::Command;
5-
use crate::env_checked::{env_var, env_var_os};
5+
use crate::env::{env_var, env_var_os};
66
use crate::util::set_host_rpath;
77

88
/// Construct a plain `rustdoc` invocation with no flags set.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ mod util;
1010
pub mod artifact_names;
1111
pub mod assertion_helpers;
1212
pub mod diff;
13-
pub mod env_checked;
13+
pub mod env;
1414
pub mod external_deps;
1515
pub mod fs_helpers;
1616
pub mod fs_wrapper;
@@ -48,7 +48,7 @@ pub use rustdoc::{bare_rustdoc, rustdoc, Rustdoc};
4848
pub use diff::{diff, Diff};
4949

5050
/// Panic-on-fail [`std::env::var`] and [`std::env::var_os`] wrappers.
51-
pub use env_checked::{env_var, env_var_os};
51+
pub use env::{env_var, env_var_os};
5252

5353
/// Convenience helpers for running binaries and other commands.
5454
pub use run::{cmd, run, run_fail, run_with_args};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::panic;
44
use std::path::{Path, PathBuf};
55

66
use crate::command::Command;
7-
use crate::env_checked::env_var;
7+
use crate::env::env_var;
88
use crate::util::handle_failed_output;
99

1010
/// Return the current working directory.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::path::PathBuf;
22

33
use crate::command::{Command, CompletedProcess};
4-
use crate::env_checked::env_var;
4+
use crate::env::env_var;
55
use crate::path_helpers::cwd;
66

77
/// If a given [`Command`] failed (as indicated by its [`CompletedProcess`]), verbose print the

0 commit comments

Comments
 (0)