diff options
| author | bors <bors@rust-lang.org> | 2017-05-26 07:36:25 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-05-26 07:36:25 +0000 |
| commit | 2db17c86e33ab89f8003960de08e3f1a3d23df8a (patch) | |
| tree | e308b525803d05b01eff0cf57265b40b33bea65a /src/libsyntax | |
| parent | 4f9c9ed1a53d176fb0650042f226222f401c21eb (diff) | |
| parent | 9a2e2450f968f60877f595d0609c15ad5ee821fa (diff) | |
| download | rust-2db17c86e33ab89f8003960de08e3f1a3d23df8a.tar.gz rust-2db17c86e33ab89f8003960de08e3f1a3d23df8a.zip | |
Auto merge of #42058 - froydnj:thiscall-support, r=nikomatsakis
add thiscall calling convention support This support is needed for bindgen to work well on 32-bit Windows, and also enables people to begin experimenting with C++ FFI support on that platform. Fixes #42044.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/abi.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/libsyntax/abi.rs b/src/libsyntax/abi.rs index 30641515a41..ed2eb209906 100644 --- a/src/libsyntax/abi.rs +++ b/src/libsyntax/abi.rs @@ -20,6 +20,7 @@ pub enum Abi { Stdcall, Fastcall, Vectorcall, + Thiscall, Aapcs, Win64, SysV64, @@ -55,6 +56,7 @@ const AbiDatas: &'static [AbiData] = &[ AbiData {abi: Abi::Stdcall, name: "stdcall", generic: false }, AbiData {abi: Abi::Fastcall, name: "fastcall", generic: false }, AbiData {abi: Abi::Vectorcall, name: "vectorcall", generic: false}, + AbiData {abi: Abi::Thiscall, name: "thiscall", generic: false}, AbiData {abi: Abi::Aapcs, name: "aapcs", generic: false }, AbiData {abi: Abi::Win64, name: "win64", generic: false }, AbiData {abi: Abi::SysV64, name: "sysv64", generic: false }, diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 6ea8fab98aa..ca579409be4 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -352,6 +352,9 @@ declare_features! ( // Allows use of the :vis macro fragment specifier (active, macro_vis_matcher, "1.18.0", Some(41022)), + + // rustc internal + (active, abi_thiscall, "1.19.0", None), ); declare_features! ( @@ -1054,6 +1057,10 @@ impl<'a> PostExpansionVisitor<'a> { gate_feature_post!(&self, abi_vectorcall, span, "vectorcall is experimental and subject to change"); }, + Abi::Thiscall => { + gate_feature_post!(&self, abi_thiscall, span, + "thiscall is experimental and subject to change"); + }, Abi::RustCall => { gate_feature_post!(&self, unboxed_closures, span, "rust-call ABI is subject to change"); |
