File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -574,8 +574,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
574574 // We temporarily dup the FD to be able to retain mutable access to `this`.
575575 let Some ( fd) = this. machine . fds . get ( fd) else {
576576 trace ! ( "read: FD not found" ) ;
577- let res = Scalar :: from_target_isize ( this. fd_not_found ( ) ?, this ) ;
578- this. write_scalar ( res, dest) ?;
577+ let res: i32 = this. fd_not_found ( ) ?;
578+ this. write_int ( res, dest) ?;
579579 return Ok ( ( ) ) ;
580580 } ;
581581
@@ -625,8 +625,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
625625 let bytes = this. read_bytes_ptr_strip_provenance ( buf, Size :: from_bytes ( count) ) ?. to_owned ( ) ;
626626 // We temporarily dup the FD to be able to retain mutable access to `this`.
627627 let Some ( fd) = this. machine . fds . get ( fd) else {
628- let res = this. fd_not_found ( ) ?;
629- this. write_scalar ( Scalar :: from_target_isize ( res, this ) , dest) ?;
628+ let res: i32 = this. fd_not_found ( ) ?;
629+ this. write_int ( res, dest) ?;
630630 return Ok ( ( ) ) ;
631631 } ;
632632
Original file line number Diff line number Diff line change @@ -71,7 +71,6 @@ impl FileDescription for Event {
7171 let Some ( bytes) = bytes. first_chunk_mut :: < U64_ARRAY_SIZE > ( ) else {
7272 let result = Ok ( Err ( Error :: from ( ErrorKind :: InvalidInput ) ) ) ;
7373 ecx. read_byte_helper ( ptr, bytes. to_vec ( ) , result, dest) ?;
74- // TODO: remove the usize later
7574 return Ok ( ( ) ) ;
7675 } ;
7776 // Block when counter == 0.
You can’t perform that action at this time.
0 commit comments