about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-03-13 18:11:51 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-03-13 18:11:51 +0530
commitd0f98fcc7fd9846c6925eb46f969febef99ae9c3 (patch)
tree5a7ed287281219714e97fb0647ef6b7d02a9b45d /src/libsyntax
parent63cd9f9d8948ad9fe138c327f2298739a240daba (diff)
parent0942803f502d164883294e29238e3ac4822867ed (diff)
downloadrust-d0f98fcc7fd9846c6925eb46f969febef99ae9c3.tar.gz
rust-d0f98fcc7fd9846c6925eb46f969febef99ae9c3.zip
Rollup merge of #23322 - dotdash:jemalloc_attrs, r=brson
 When this attribute is applied to a function, its return value gets the
noalias attribute, which is how you tell LLVM that the function returns
a \"new\" pointer that doesn't alias anything accessible to the caller,
i.e. it acts like a memory allocator.

Plain malloc doesn't need this attribute because LLVM already knows
about malloc and adds the attribute itself.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index c3bac0cf57c..0a9980c8925 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -83,6 +83,7 @@ const KNOWN_FEATURES: &'static [(&'static str, &'static str, Status)] = &[
     ("box_syntax", "1.0.0", Active),
     ("on_unimplemented", "1.0.0", Active),
     ("simd_ffi", "1.0.0", Active),
+    ("allocator", "1.0.0", Active),
 
     ("if_let", "1.0.0", Accepted),
     ("while_let", "1.0.0", Accepted),
@@ -230,6 +231,8 @@ pub const KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType)] = &[
     ("rustc_on_unimplemented", Gated("on_unimplemented",
                                      "the `#[rustc_on_unimplemented]` attribute \
                                       is an experimental feature")),
+    ("allocator", Gated("allocator",
+                        "the `#[allocator]` attribute is an experimental feature")),
     ("rustc_variance", Gated("rustc_attrs",
                              "the `#[rustc_variance]` attribute \
                               is an experimental feature")),