diff --git a/rust-version b/rust-version index 1f61617e11..464ab46b92 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -bcd696d722c04a0f8c34d884aa4ed2322f55cdd8 +59f551a2dcf57c0d3d96ac5ef60e000524210469 diff --git a/src/helpers.rs b/src/helpers.rs index 7fe0ae0a97..8a7657745b 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -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", @@ -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",