Skip to content

Commit 20a2a24

Browse files
committed
Auto merge of rust-lang#2932 - RalfJung:comment, r=RalfJung
comment tweaks
2 parents 6f771c8 + 5c9ad8b commit 20a2a24

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/tools/miri/src/shims/foreign_items.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,10 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
417417
// // First thing: load all the arguments. Details depend on the shim.
418418
// let arg1 = this.read_scalar(arg1)?.to_u32()?;
419419
// let arg2 = this.read_pointer(arg2)?; // when you need to work with the pointer directly
420-
// let arg3 = this.deref_operand(arg3)?; // when you want to load/store through the pointer
421-
// let arg4 = this.deref_operand_as(arg4, this.libc_ty_layout("some_libc_struct")?)
420+
// let arg3 = this.deref_operand_as(arg3, this.libc_ty_layout("some_libc_struct"))?; // when you want to load/store
421+
// // through the pointer and supply the type information yourself
422+
// let arg4 = this.deref_operand(arg4)?; // when you want to load/store through the pointer and trust
423+
// // the user-given type (which you shouldn't usually do)
422424
//
423425
// // ...
424426
//

0 commit comments

Comments
 (0)