Skip to content

Commit 44db1fd

Browse files
committed
Auto merge of #1786 - RalfJung:rustup, r=RalfJung
fix checking os_family Cc rust-lang/rust#84848
2 parents 0e30385 + aac6e2a commit 44db1fd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
bcd696d722c04a0f8c34d884aa4ed2322f55cdd8
1+
59f551a2dcf57c0d3d96ac5ef60e000524210469

src/helpers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
443443
let this = self.eval_context_mut();
444444
let target = &this.tcx.sess.target;
445445
let target_os = &target.os;
446-
let last_error = if target.os_family == Some("unix".to_owned()) {
446+
let last_error = if target.families.contains(&"unix".to_owned()) {
447447
this.eval_libc(match e.kind() {
448448
ConnectionRefused => "ECONNREFUSED",
449449
ConnectionReset => "ECONNRESET",
@@ -463,7 +463,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
463463
throw_unsup_format!("io error {} cannot be transformed into a raw os error", e)
464464
}
465465
})?
466-
} else if target_os == "windows" {
466+
} else if target.families.contains(&"windows".to_owned()) {
467467
// FIXME: we have to finish implementing the Windows equivalent of this.
468468
this.eval_windows("c", match e.kind() {
469469
NotFound => "ERROR_FILE_NOT_FOUND",

0 commit comments

Comments
 (0)