about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-01-28 16:45:52 +0100
committerGitHub <noreply@github.com>2024-01-28 16:45:52 +0100
commit8302e25529b88f4c2f561ca519bcb4faf34bc25f (patch)
tree14450a19832e8bdd0fd0982fa9194be2576e4a4e
parent9911d8d9bf4552f0ce05914e2ad239cd3fdc3634 (diff)
downloadrust-8302e25529b88f4c2f561ca519bcb4faf34bc25f.tar.gz
rust-8302e25529b88f4c2f561ca519bcb4faf34bc25f.zip
tweak comments
-rw-r--r--src/tools/miri/src/helpers.rs2
-rw-r--r--src/tools/miri/src/shims/unix/fs.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/miri/src/helpers.rs b/src/tools/miri/src/helpers.rs
index 3651db982b3..eb9d8e8e68e 100644
--- a/src/tools/miri/src/helpers.rs
+++ b/src/tools/miri/src/helpers.rs
@@ -225,7 +225,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
         bug!("No field named {} in type {}", name, base.layout().ty);
     }
 
-    /// Search if Project (which must be a struct or union type) contains the `name` field.
+    /// Search if `base` (which must be a struct or union type) contains the `name` field.
     fn projectable_has_field<P: Projectable<'tcx, Provenance>>(
         &self,
         base: &P,
diff --git a/src/tools/miri/src/shims/unix/fs.rs b/src/tools/miri/src/shims/unix/fs.rs
index b2170c8c87f..5b93db19d55 100644
--- a/src/tools/miri/src/shims/unix/fs.rs
+++ b/src/tools/miri/src/shims/unix/fs.rs
@@ -1466,8 +1466,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
                         ],
                         &entry_place,
                     )?;
-                    // freebsd 12 and onwards had added the d_off field
                 } else if this.projectable_has_field(&entry_place, "d_off") {
+                    // freebsd 12 and onwards had added the d_off field
                     this.write_int_fields_named(
                         &[
                             ("d_fileno", ino.into()),