@@ -36,9 +36,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
3636    )  -> InterpResult < ' tcx ,  i32 >  { 
3737        let  this = self . eval_context_mut ( ) ; 
3838
39-         if  !this. machine . communicate  { 
40-             throw_unsup_format ! ( "`open` not available when isolation is enabled" ) 
41-         } 
39+         this. check_no_isolation ( "open" ) ?; 
4240
4341        let  flag = this. read_scalar ( flag_op) ?. to_i32 ( ) ?; 
4442
@@ -91,9 +89,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
9189    )  -> InterpResult < ' tcx ,  i32 >  { 
9290        let  this = self . eval_context_mut ( ) ; 
9391
94-         if  !this. machine . communicate  { 
95-             throw_unsup_format ! ( "`fcntl` not available when isolation is enabled" ) 
96-         } 
92+         this. check_no_isolation ( "fcntl" ) ?; 
9793
9894        let  fd = this. read_scalar ( fd_op) ?. to_i32 ( ) ?; 
9995        let  cmd = this. read_scalar ( cmd_op) ?. to_i32 ( ) ?; 
@@ -126,9 +122,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
126122    fn  close ( & mut  self ,  fd_op :  OpTy < ' tcx ,  Tag > )  -> InterpResult < ' tcx ,  i32 >  { 
127123        let  this = self . eval_context_mut ( ) ; 
128124
129-         if  !this. machine . communicate  { 
130-             throw_unsup_format ! ( "`close` not available when isolation is enabled" ) 
131-         } 
125+         this. check_no_isolation ( "close" ) ?; 
132126
133127        let  fd = this. read_scalar ( fd_op) ?. to_i32 ( ) ?; 
134128
@@ -145,9 +139,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
145139    )  -> InterpResult < ' tcx ,  i64 >  { 
146140        let  this = self . eval_context_mut ( ) ; 
147141
148-         if  !this. machine . communicate  { 
149-             throw_unsup_format ! ( "`read` not available when isolation is enabled" ) 
150-         } 
142+         this. check_no_isolation ( "read" ) ?; 
151143
152144        let  tcx = & {  this. tcx . tcx  } ; 
153145
@@ -182,9 +174,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
182174    )  -> InterpResult < ' tcx ,  i64 >  { 
183175        let  this = self . eval_context_mut ( ) ; 
184176
185-         if  !this. machine . communicate  { 
186-             throw_unsup_format ! ( "`write` not available when isolation is enabled" ) 
187-         } 
177+         this. check_no_isolation ( "write" ) ?; 
188178
189179        let  tcx = & {  this. tcx . tcx  } ; 
190180
@@ -210,9 +200,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
210200    fn  unlink (  & mut  self ,  path_op :  OpTy < ' tcx ,  Tag > )  -> InterpResult < ' tcx ,  i32 >  { 
211201        let  this = self . eval_context_mut ( ) ; 
212202
213-         if  !this. machine . communicate  { 
214-             throw_unsup_format ! ( "`write` not available when isolation is enabled" ) 
215-         } 
203+         this. check_no_isolation ( "unlink" ) ?; 
216204
217205        let  path_bytes = this
218206            . memory ( ) 
0 commit comments