Skip to content

Commit fd05ff5

Browse files
committed
Auto merge of rust-lang#2546 - RalfJung:comments, r=RalfJung
add/fix some comments
2 parents bb3bac0 + 7fdd924 commit fd05ff5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/eval.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,10 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
295295

296296
let main_ptr = ecx.create_fn_alloc_ptr(FnVal::Instance(entry_instance));
297297

298-
let sigpipe = 2; // Inlining of `DEFAULT` from https://github.com/rust-lang/rust/blob/master/compiler/rustc_session/src/config/sigpipe.rs
298+
// Inlining of `DEFAULT` from
299+
// https://github.com/rust-lang/rust/blob/master/compiler/rustc_session/src/config/sigpipe.rs.
300+
// Alaways using DEFAULT is okay since we don't support signals in Miri anyway.
301+
let sigpipe = 2;
299302

300303
ecx.call_function(
301304
start_instance,

src/shims/windows/foreign_items.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
294294
let flags = this.read_scalar(flags)?.to_u32()?;
295295
match flags {
296296
0 => {
297-
// BCRYPT_RNG_ALG_HANDLE
298297
if algorithm != 0x81 {
298+
// BCRYPT_RNG_ALG_HANDLE
299299
throw_unsup_format!(
300300
"BCryptGenRandom algorithm must be BCRYPT_RNG_ALG_HANDLE when the flag is 0"
301301
);

0 commit comments

Comments
 (0)