@@ -38,7 +38,7 @@ impl<'tcx> EnvVars<'tcx> {
38
38
ecx : & mut InterpCx < ' mir , ' tcx , Evaluator < ' mir , ' tcx > > ,
39
39
mut excluded_env_vars : Vec < String > ,
40
40
) -> InterpResult < ' tcx > {
41
- let target_os = ecx. tcx . sess . target . target . target_os . as_str ( ) ;
41
+ let target_os = ecx. tcx . sess . target . target_os . as_str ( ) ;
42
42
if target_os == "windows" {
43
43
// Temporary hack: Exclude `TERM` var to avoid terminfo trying to open the termcap file.
44
44
// Can be removed once https://github.com/rust-lang/miri/issues/1013 is resolved.
@@ -101,7 +101,7 @@ impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for crate::MiriEvalContext<'mi
101
101
pub trait EvalContextExt < ' mir , ' tcx : ' mir > : crate :: MiriEvalContextExt < ' mir , ' tcx > {
102
102
fn getenv ( & mut self , name_op : OpTy < ' tcx , Tag > ) -> InterpResult < ' tcx , Scalar < Tag > > {
103
103
let this = self . eval_context_mut ( ) ;
104
- let target_os = & this. tcx . sess . target . target . target_os ;
104
+ let target_os = & this. tcx . sess . target . target_os ;
105
105
assert ! ( target_os == "linux" || target_os == "macos" , "`getenv` is only available for the UNIX target family" ) ;
106
106
107
107
let name_ptr = this. read_scalar ( name_op) ?. check_init ( ) ?;
@@ -185,7 +185,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
185
185
value_op : OpTy < ' tcx , Tag > ,
186
186
) -> InterpResult < ' tcx , i32 > {
187
187
let mut this = self . eval_context_mut ( ) ;
188
- let target_os = & this. tcx . sess . target . target . target_os ;
188
+ let target_os = & this. tcx . sess . target . target_os ;
189
189
assert ! ( target_os == "linux" || target_os == "macos" , "`setenv` is only available for the UNIX target family" ) ;
190
190
191
191
let name_ptr = this. read_scalar ( name_op) ?. check_init ( ) ?;
@@ -258,7 +258,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
258
258
259
259
fn unsetenv ( & mut self , name_op : OpTy < ' tcx , Tag > ) -> InterpResult < ' tcx , i32 > {
260
260
let this = self . eval_context_mut ( ) ;
261
- let target_os = & this. tcx . sess . target . target . target_os ;
261
+ let target_os = & this. tcx . sess . target . target_os ;
262
262
assert ! ( target_os == "linux" || target_os == "macos" , "`unsetenv` is only available for the UNIX target family" ) ;
263
263
264
264
let name_ptr = this. read_scalar ( name_op) ?. check_init ( ) ?;
@@ -290,7 +290,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
290
290
size_op : OpTy < ' tcx , Tag > ,
291
291
) -> InterpResult < ' tcx , Scalar < Tag > > {
292
292
let this = self . eval_context_mut ( ) ;
293
- let target_os = & this. tcx . sess . target . target . target_os ;
293
+ let target_os = & this. tcx . sess . target . target_os ;
294
294
assert ! ( target_os == "linux" || target_os == "macos" , "`getcwd` is only available for the UNIX target family" ) ;
295
295
296
296
this. check_no_isolation ( "`getcwd`" ) ?;
@@ -336,7 +336,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
336
336
337
337
fn chdir ( & mut self , path_op : OpTy < ' tcx , Tag > ) -> InterpResult < ' tcx , i32 > {
338
338
let this = self . eval_context_mut ( ) ;
339
- let target_os = & this. tcx . sess . target . target . target_os ;
339
+ let target_os = & this. tcx . sess . target . target_os ;
340
340
assert ! ( target_os == "linux" || target_os == "macos" , "`getcwd` is only available for the UNIX target family" ) ;
341
341
342
342
this. check_no_isolation ( "`chdir`" ) ?;
0 commit comments