about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-06-16 13:56:46 +0000
committerbors <bors@rust-lang.org>2023-06-16 13:56:46 +0000
commit20a2a24e11270bd90feb54cd7fde7b4aeacba76a (patch)
tree0a64869d6a82f5595107364024fb9be0b6a33a6d
parent6f771c8f449653cb6ca13b69c9a6a2e28b0a1bc2 (diff)
parent5c9ad8bda057dbdec0f0f827a5d29d7aa9da3e87 (diff)
downloadrust-20a2a24e11270bd90feb54cd7fde7b4aeacba76a.tar.gz
rust-20a2a24e11270bd90feb54cd7fde7b4aeacba76a.zip
Auto merge of #2932 - RalfJung:comment, r=RalfJung
comment tweaks
-rw-r--r--src/tools/miri/src/shims/foreign_items.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/miri/src/shims/foreign_items.rs b/src/tools/miri/src/shims/foreign_items.rs
index d52582ce901..f4e91c30d9f 100644
--- a/src/tools/miri/src/shims/foreign_items.rs
+++ b/src/tools/miri/src/shims/foreign_items.rs
@@ -417,8 +417,10 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
         //     // First thing: load all the arguments. Details depend on the shim.
         //     let arg1 = this.read_scalar(arg1)?.to_u32()?;
         //     let arg2 = this.read_pointer(arg2)?; // when you need to work with the pointer directly
-        //     let arg3 = this.deref_operand(arg3)?; // when you want to load/store through the pointer
-        //     let arg4 = this.deref_operand_as(arg4, this.libc_ty_layout("some_libc_struct")?)
+        //     let arg3 = this.deref_operand_as(arg3, this.libc_ty_layout("some_libc_struct"))?; // when you want to load/store
+        //         // through the pointer and supply the type information yourself
+        //     let arg4 = this.deref_operand(arg4)?; // when you want to load/store through the pointer and trust
+        //         // the user-given type (which you shouldn't usually do)
         //
         //     // ...
         //