@@ -21,7 +21,7 @@ pub(crate) enum FlockOp {
2121 Unlock ,
2222}
2323
24- /// Represents an open file descriptor .
24+ /// Represents an open file description .
2525pub trait FileDescription : std:: fmt:: Debug + Any {
2626 fn name ( & self ) -> & ' static str ;
2727
@@ -303,7 +303,7 @@ pub struct FdTable {
303303
304304impl VisitProvenance for FdTable {
305305 fn visit_provenance ( & self , _visit : & mut VisitWith < ' _ > ) {
306- // All our FileDescriptor do not have any tags.
306+ // All our FileDescriptionRef do not have any tags.
307307 }
308308}
309309
@@ -411,7 +411,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
411411
412412 fn flock ( & mut self , fd : i32 , op : i32 ) -> InterpResult < ' tcx , Scalar > {
413413 let this = self . eval_context_mut ( ) ;
414- let Some ( file_descriptor ) = this. machine . fds . get ( fd) else {
414+ let Some ( fd_ref ) = this. machine . fds . get ( fd) else {
415415 return Ok ( Scalar :: from_i32 ( this. fd_not_found ( ) ?) ) ;
416416 } ;
417417
@@ -436,8 +436,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
436436 throw_unsup_format ! ( "unsupported flags {:#x}" , op) ;
437437 } ;
438438
439- let result = file_descriptor . flock ( this. machine . communicate ( ) , parsed_op) ?;
440- drop ( file_descriptor ) ;
439+ let result = fd_ref . flock ( this. machine . communicate ( ) , parsed_op) ?;
440+ drop ( fd_ref ) ;
441441 // return `0` if flock is successful
442442 let result = result. map ( |( ) | 0i32 ) ;
443443 Ok ( Scalar :: from_i32 ( this. try_unwrap_io_result ( result) ?) )
@@ -539,7 +539,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
539539 ) -> InterpResult < ' tcx , Scalar > {
540540 let this = self . eval_context_mut ( ) ;
541541
542- // Isolation check is done via `FileDescriptor ` trait.
542+ // Isolation check is done via `FileDescription ` trait.
543543
544544 trace ! ( "Reading from FD {}, size {}" , fd, count) ;
545545
@@ -604,7 +604,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
604604 ) -> InterpResult < ' tcx , Scalar > {
605605 let this = self . eval_context_mut ( ) ;
606606
607- // Isolation check is done via `FileDescriptor ` trait.
607+ // Isolation check is done via `FileDescription ` trait.
608608
609609 // Check that the *entire* buffer is actually valid memory.
610610 this. check_ptr_access ( buf, Size :: from_bytes ( count) , CheckInAllocMsg :: MemoryAccessTest ) ?;
0 commit comments