Skip to content

Commit 64bc206

Browse files
committed
rustc_target: introduce Env
Improve type safety by using an enum rather than strings.
1 parent 5a0893c commit 64bc206

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/shims/windows/foreign_items.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use rustc_abi::{Align, CanonAbi, Size, X86Call};
66
use rustc_middle::ty::Ty;
77
use rustc_span::Symbol;
88
use rustc_target::callconv::FnAbi;
9-
use rustc_target::spec::Arch;
9+
use rustc_target::spec::{Arch, Env};
1010

1111
use self::shims::windows::handle::{Handle, PseudoHandle};
1212
use crate::shims::os_str::bytes_to_os_str;
@@ -826,7 +826,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
826826
// It was originally specified as part of the Itanium C++ ABI:
827827
// https://itanium-cxx-abi.github.io/cxx-abi/abi-eh.html#base-throw.
828828
// MinGW implements _Unwind_RaiseException on top of SEH exceptions.
829-
if this.tcx.sess.target.env != "gnu" {
829+
if this.tcx.sess.target.env != Env::Gnu {
830830
throw_unsup_format!(
831831
"`_Unwind_RaiseException` is not supported on non-MinGW Windows",
832832
);

0 commit comments

Comments
 (0)