Skip to content

Commit

Permalink
Auto merge of #2932 - RalfJung:comment, r=RalfJung
Browse files Browse the repository at this point in the history
comment tweaks
  • Loading branch information
bors committed Jun 16, 2023
2 parents 6f771c8 + 5c9ad8b commit 20a2a24
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/tools/miri/src/shims/foreign_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
//
// // ...
//
Expand Down

0 comments on commit 20a2a24

Please sign in to comment.