about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-02-24 14:15:55 +0000
committerbors <bors@rust-lang.org>2019-02-24 14:15:55 +0000
commit097c04cf433048585dd9e3f63b30e03cc3509e4b (patch)
tree2eede5dc9fa313a4df57e6215f019f5e08028568 /src/libsyntax
parente17c48e2f21eefd59748e364234efc7037a3ec96 (diff)
parent94aa74004efddf0cfb6fe4bb65eee9effbe40ae8 (diff)
downloadrust-097c04cf433048585dd9e3f63b30e03cc3509e4b.tar.gz
rust-097c04cf433048585dd9e3f63b30e03cc3509e4b.zip
Auto merge of #58315 - gnzlbg:returns_twice, r=alexcrichton
Implement unstable ffi_return_twice attribute

This PR implements [RFC2633](https://github.com/rust-lang/rfcs/pull/2633)

r? @eddyb
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index d574b410ccc..c9b441193b7 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -290,6 +290,9 @@ declare_features! (
     // The `repr(i128)` annotation for enums.
     (active, repr128, "1.16.0", Some(35118), None),
 
+    // Allows the use of `#[ffi_returns_twice]` on foreign functions.
+    (active, ffi_returns_twice, "1.34.0", Some(58314), None),
+
     // The `unadjusted` ABI; perma-unstable.
     //
     // rustc internal
@@ -1128,6 +1131,11 @@ pub const BUILTIN_ATTRIBUTES: &[(&str, AttributeType, AttributeTemplate, Attribu
                                  "the `#[naked]` attribute \
                                   is an experimental feature",
                                  cfg_fn!(naked_functions))),
+    ("ffi_returns_twice", Whitelisted, template!(Word), Gated(Stability::Unstable,
+                                 "ffi_returns_twice",
+                                 "the `#[ffi_returns_twice]` attribute \
+                                  is an experimental feature",
+                                 cfg_fn!(ffi_returns_twice))),
     ("target_feature", Whitelisted, template!(List: r#"enable = "name""#), Ungated),
     ("export_name", Whitelisted, template!(NameValueStr: "name"), Ungated),
     ("inline", Whitelisted, template!(Word, List: "always|never"), Ungated),