about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-06-08 11:36:30 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-06-08 23:55:25 +0300
commit74a6d1c821a37a407d2b2bc701d62d0b460b9215 (patch)
tree0fb11c32bcc088719f9a54eeff4315d61507d505 /src/liballoc
parent8049e6199bad86d3148c94463216cc745db2d796 (diff)
downloadrust-74a6d1c821a37a407d2b2bc701d62d0b460b9215.tar.gz
rust-74a6d1c821a37a407d2b2bc701d62d0b460b9215.zip
Turn `#[allocator]` into a built-in attribute and rename it to `#[rustc_allocator]`
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/alloc.rs3
-rw-r--r--src/liballoc/lib.rs2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/liballoc/alloc.rs b/src/liballoc/alloc.rs
index 41ff06d70ff..755feb84962 100644
--- a/src/liballoc/alloc.rs
+++ b/src/liballoc/alloc.rs
@@ -15,7 +15,8 @@ extern "Rust" {
     // them from the `#[global_allocator]` attribute if there is one, or uses the
     // default implementations in libstd (`__rdl_alloc` etc in `src/libstd/alloc.rs`)
     // otherwise.
-    #[allocator]
+    #[cfg_attr(bootstrap, allocator)]
+    #[cfg_attr(not(bootstrap), rustc_allocator)]
     #[rustc_allocator_nounwind]
     fn __rust_alloc(size: usize, align: usize) -> *mut u8;
     #[rustc_allocator_nounwind]
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs
index bfc008e14a4..c530ac24275 100644
--- a/src/liballoc/lib.rs
+++ b/src/liballoc/lib.rs
@@ -79,7 +79,7 @@
 #![feature(coerce_unsized)]
 #![feature(dispatch_from_dyn)]
 #![feature(core_intrinsics)]
-#![feature(custom_attribute)]
+#![cfg_attr(bootstrap, feature(custom_attribute))]
 #![feature(dropck_eyepatch)]
 #![feature(exact_size_is_empty)]
 #![feature(fmt_internals)]