File tree 2 files changed +1
-21
lines changed
2 files changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -675,26 +675,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
675
675
)
676
676
}
677
677
678
- /// Helper function used inside the shims of foreign functions to assert that the target OS
679
- /// is one of `target_oses`. It panics showing a message with the `name` of the foreign function
680
- /// if this is not the case.
681
- fn assert_target_os_is_one_of ( & self , target_oses : & [ & str ] , name : & str ) {
682
- assert ! (
683
- target_oses. contains( & self . eval_context_ref( ) . tcx. sess. target. os. as_ref( ) ) ,
684
- "`{name}` is only available on the {} target OS's" ,
685
- target_oses
686
- . iter( )
687
- . enumerate( )
688
- . map( |( i, t) | {
689
- match i {
690
- 0 => format!( "`{t}`" ) ,
691
- _ => format!( ", `{t}`" ) ,
692
- }
693
- } )
694
- . collect:: <String >( )
695
- )
696
- }
697
-
698
678
/// Helper function used inside the shims of foreign functions to assert that the target OS
699
679
/// is part of the UNIX family. It panics showing a message with the `name` of the foreign function
700
680
/// if this is not the case.
Original file line number Diff line number Diff line change @@ -276,7 +276,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
276
276
277
277
fn linux_gettid ( & mut self ) -> InterpResult < ' tcx , Scalar > {
278
278
let this = self . eval_context_ref ( ) ;
279
- this. assert_target_os_is_one_of ( & [ "linux" , "android" ] , "gettid" ) ;
279
+ this. assert_target_os ( "linux" , "gettid" ) ;
280
280
281
281
let index = this. machine . threads . active_thread ( ) . to_u32 ( ) ;
282
282
You can’t perform that action at this time.
0 commit comments