Skip to content

Commit

Permalink
Auto merge of #1786 - RalfJung:rustup, r=RalfJung
Browse files Browse the repository at this point in the history
fix checking os_family

Cc rust-lang/rust#84848
  • Loading branch information
bors committed May 3, 2021
2 parents 0e30385 + aac6e2a commit 44db1fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bcd696d722c04a0f8c34d884aa4ed2322f55cdd8
59f551a2dcf57c0d3d96ac5ef60e000524210469
4 changes: 2 additions & 2 deletions src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
let this = self.eval_context_mut();
let target = &this.tcx.sess.target;
let target_os = &target.os;
let last_error = if target.os_family == Some("unix".to_owned()) {
let last_error = if target.families.contains(&"unix".to_owned()) {
this.eval_libc(match e.kind() {
ConnectionRefused => "ECONNREFUSED",
ConnectionReset => "ECONNRESET",
Expand All @@ -463,7 +463,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
throw_unsup_format!("io error {} cannot be transformed into a raw os error", e)
}
})?
} else if target_os == "windows" {
} else if target.families.contains(&"windows".to_owned()) {
// FIXME: we have to finish implementing the Windows equivalent of this.
this.eval_windows("c", match e.kind() {
NotFound => "ERROR_FILE_NOT_FOUND",
Expand Down

0 comments on commit 44db1fd

Please sign in to comment.