Skip to content

Commit 310faa9

Browse files
committed
Fix ci
1 parent 4a363ea commit 310faa9

2 files changed

Lines changed: 16 additions & 15 deletions

File tree

build.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ use build_target::{Arch, Os};
22

33
fn main() {
44
let version_meta = rustc_version::version_meta().unwrap();
5-
if cfg!(feature = "nightly") && !cfg!(feature = "stable")
6-
|| version_meta.channel == rustc_version::Channel::Nightly
7-
{
5+
let use_nightly = cfg!(feature = "nightly") && !cfg!(feature = "stable")
6+
|| version_meta.channel == rustc_version::Channel::Nightly;
7+
if use_nightly {
88
cargo_emit::rustc_cfg!("nightly");
99
}
1010

@@ -18,7 +18,8 @@ fn main() {
1818
cargo_emit::rustc_cfg!("has_abi_thiscall");
1919
}
2020

21-
if matches!(t.arch, Arch::X86 | Arch::X86_64) && cfg!(feature = "abi_vectorcall") {
21+
if matches!(t.arch, Arch::X86 | Arch::X86_64) && cfg!(feature = "abi_vectorcall") && use_nightly
22+
{
2223
cargo_emit::rustc_cfg!("has_abi_vectorcall");
2324
}
2425

src/abi.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ use core::{
99
pub enum Abi {
1010
/* universal */
1111
/// This is the same as `extern fn foo()`; whatever the default your C compiler supports.
12-
C {
12+
C {
1313
/// Whether unwinding across this ABI boundary is allowed (`*-unwind`).
14-
unwind: bool
14+
unwind: bool,
1515
},
1616
/// Usually the same as [`extern "C"`](Abi::C), except on Win32, in which case it's
1717
/// [`"stdcall"`](Abi::Stdcall), or what you should use to link to the Windows API itself.
1818
System {
1919
/// Whether unwinding across this ABI boundary is allowed (`*-unwind`).
20-
unwind: bool
20+
unwind: bool,
2121
},
2222

2323
/// The default ABI when you write a normal `fn foo()` in any Rust code.
@@ -27,46 +27,46 @@ pub enum Abi {
2727
/// The default for ARM.
2828
Aapcs {
2929
/// Whether unwinding across this ABI boundary is allowed (`*-unwind`).
30-
unwind: bool
30+
unwind: bool,
3131
},
3232

3333
/* x86 */
3434
/// The default for `x86_32` C code.
3535
Cdecl {
3636
/// Whether unwinding across this ABI boundary is allowed (`*-unwind`).
37-
unwind: bool
37+
unwind: bool,
3838
},
3939
/// The default for the Win32 API on `x86_32`.
4040
Stdcall {
4141
/// Whether unwinding across this ABI boundary is allowed (`*-unwind`).
42-
unwind: bool
42+
unwind: bool,
4343
},
4444
/// The `fastcall` ABI.
4545
Fastcall {
4646
/// Whether unwinding across this ABI boundary is allowed (`*-unwind`).
47-
unwind: bool
47+
unwind: bool,
4848
},
4949
/// The Windows C++ ABI.
5050
Thiscall {
5151
/// Whether unwinding across this ABI boundary is allowed (`*-unwind`).
52-
unwind: bool
52+
unwind: bool,
5353
},
5454
/// The `vectorcall` ABI.
5555
Vectorcall {
5656
/// Whether unwinding across this ABI boundary is allowed (`*-unwind`).
57-
unwind: bool
57+
unwind: bool,
5858
},
5959

6060
/* x86_64 */
6161
/// The default for C code on non-Windows `x86_64`.
6262
SysV64 {
6363
/// Whether unwinding across this ABI boundary is allowed (`*-unwind`).
64-
unwind: bool
64+
unwind: bool,
6565
},
6666
/// The default for C code on `x86_64` Windows.
6767
Win64 {
6868
/// Whether unwinding across this ABI boundary is allowed (`*-unwind`).
69-
unwind: bool
69+
unwind: bool,
7070
},
7171
}
7272

0 commit comments

Comments
 (0)