Skip to content

Commit e1116b9

Browse files
committed
remove restrictions due to stat unavailability
1 parent dbc1189 commit e1116b9

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

src/shims/env.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,8 @@ pub struct EnvVars {
1818
impl EnvVars {
1919
pub(crate) fn init<'mir, 'tcx>(
2020
ecx: &mut InterpCx<'mir, 'tcx, Evaluator<'tcx>>,
21-
mut excluded_env_vars: Vec<String>,
21+
excluded_env_vars: Vec<String>,
2222
) {
23-
24-
// FIXME: this can be removed when we have the `stat64` shim for macos.
25-
if ecx.tcx.sess.target.target.target_os.to_lowercase() != "linux" {
26-
// Exclude `TERM` var to avoid terminfo trying to open the termcap file.
27-
excluded_env_vars.push("TERM".to_owned());
28-
}
29-
3023
if ecx.machine.communicate {
3124
for (name, value) in env::vars() {
3225
if !excluded_env_vars.contains(&name) {

tests/run-pass/fs.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,5 @@ fn main() {
5151
// Removing a non-existing file should fail with a "not found" error.
5252
assert_eq!(ErrorKind::NotFound, remove_file(&path).unwrap_err().kind());
5353
// Reading the metadata of a non-existing file should fail with a "not found" error.
54-
if cfg!(target_os = "linux") { // FIXME: Implement stat64 for macos.
55-
assert_eq!(ErrorKind::NotFound, test_metadata(bytes, &path).unwrap_err().kind());
56-
}
54+
assert_eq!(ErrorKind::NotFound, test_metadata(bytes, &path).unwrap_err().kind());
5755
}

0 commit comments

Comments
 (0)