about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-03-23 03:49:02 -0700
committerbors <bors@rust-lang.org>2016-03-23 03:49:02 -0700
commit26cfc269a0ec6a7c895c38954e9701b62940df07 (patch)
tree5e4e1c349375ccddf8dce3be4e996915c26d7bee /src/libsyntax
parentd6af19b89c477708ed0f5341ab7a26f1764f1ffa (diff)
parent4869417b6187e16091bfd5e45e36c999c7d0b98f (diff)
downloadrust-26cfc269a0ec6a7c895c38954e9701b62940df07.tar.gz
rust-26cfc269a0ec6a7c895c38954e9701b62940df07.zip
Auto merge of #32410 - Ticki:master, r=eddyb
Add support for naked functions

See https://github.com/rust-lang/rfcs/pull/1201#issuecomment-199442239

This PR adds `#[naked]` for marking naked functions.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index a017e62d546..698913be292 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -212,6 +212,9 @@ const KNOWN_FEATURES: &'static [(&'static str, &'static str, Option<u32>, Status
     // rust runtime internal
     ("unwind_attributes", "1.4.0", None, Active),
 
+    // allow the use of `#[naked]` on functions.
+    ("naked_functions", "1.9.0", None, Active),
+
     // allow empty structs and enum variants with braces
     ("braced_empty_structs", "1.5.0", Some(29720), Accepted),
 
@@ -376,6 +379,9 @@ pub const KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeGat
     // FIXME: #14406 these are processed in trans, which happens after the
     // lint pass
     ("cold", Whitelisted, Ungated),
+    ("naked", Whitelisted, Gated("naked_functions",
+                                 "the `#[naked]` attribute \
+                                  is an experimental feature")),
     ("export_name", Whitelisted, Ungated),
     ("inline", Whitelisted, Ungated),
     ("link", Whitelisted, Ungated),