@@ -38,7 +38,7 @@ impl<'tcx> EnvVars<'tcx> {
3838 ecx : & mut InterpCx < ' mir , ' tcx , Evaluator < ' mir , ' tcx > > ,
3939 mut excluded_env_vars : Vec < String > ,
4040 ) -> 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 ( ) ;
4242 if target_os == "windows" {
4343 // Temporary hack: Exclude `TERM` var to avoid terminfo trying to open the termcap file.
4444 // 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
101101pub trait EvalContextExt < ' mir , ' tcx : ' mir > : crate :: MiriEvalContextExt < ' mir , ' tcx > {
102102 fn getenv ( & mut self , name_op : OpTy < ' tcx , Tag > ) -> InterpResult < ' tcx , Scalar < Tag > > {
103103 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 ;
105105 assert ! ( target_os == "linux" || target_os == "macos" , "`getenv` is only available for the UNIX target family" ) ;
106106
107107 let name_ptr = this. read_scalar ( name_op) ?. check_init ( ) ?;
@@ -185,7 +185,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
185185 value_op : OpTy < ' tcx , Tag > ,
186186 ) -> InterpResult < ' tcx , i32 > {
187187 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 ;
189189 assert ! ( target_os == "linux" || target_os == "macos" , "`setenv` is only available for the UNIX target family" ) ;
190190
191191 let name_ptr = this. read_scalar ( name_op) ?. check_init ( ) ?;
@@ -258,7 +258,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
258258
259259 fn unsetenv ( & mut self , name_op : OpTy < ' tcx , Tag > ) -> InterpResult < ' tcx , i32 > {
260260 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 ;
262262 assert ! ( target_os == "linux" || target_os == "macos" , "`unsetenv` is only available for the UNIX target family" ) ;
263263
264264 let name_ptr = this. read_scalar ( name_op) ?. check_init ( ) ?;
@@ -290,7 +290,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
290290 size_op : OpTy < ' tcx , Tag > ,
291291 ) -> InterpResult < ' tcx , Scalar < Tag > > {
292292 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 ;
294294 assert ! ( target_os == "linux" || target_os == "macos" , "`getcwd` is only available for the UNIX target family" ) ;
295295
296296 this. check_no_isolation ( "`getcwd`" ) ?;
@@ -336,7 +336,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
336336
337337 fn chdir ( & mut self , path_op : OpTy < ' tcx , Tag > ) -> InterpResult < ' tcx , i32 > {
338338 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 ;
340340 assert ! ( target_os == "linux" || target_os == "macos" , "`getcwd` is only available for the UNIX target family" ) ;
341341
342342 this. check_no_isolation ( "`chdir`" ) ?;
0 commit comments