about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-09-21 16:01:34 +0200
committerGitHub <noreply@github.com>2019-09-21 16:01:34 +0200
commit1486b7f91ce18962038ef36d2479e57e27a569ed (patch)
tree7e06ceccadc69cf3115de1a8461ce7808a9b1a8e /src/liballoc
parent6254d7a80a77db4d314353e418d36e1a6317c749 (diff)
parent9f374da46781cfe2d297636fe97b2fd9647cb1d9 (diff)
downloadrust-1486b7f91ce18962038ef36d2479e57e27a569ed.tar.gz
rust-1486b7f91ce18962038ef36d2479e57e27a569ed.zip
Rollup merge of #64641 - cuviper:extern-rust-ctypes, r=estebank
Exempt extern "Rust" from improper_ctypes

It should be fine for Rust ABIs to involve any Rust type.

Fixes #64593.
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/alloc.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/alloc.rs b/src/liballoc/alloc.rs
index dc7fd1adc29..a39fcd5ad4c 100644
--- a/src/liballoc/alloc.rs
+++ b/src/liballoc/alloc.rs
@@ -240,7 +240,7 @@ pub(crate) unsafe fn box_free<T: ?Sized>(ptr: Unique<T>) {
 #[stable(feature = "global_alloc", since = "1.28.0")]
 #[rustc_allocator_nounwind]
 pub fn handle_alloc_error(layout: Layout) -> ! {
-    #[allow(improper_ctypes)]
+    #[cfg_attr(bootstrap, allow(improper_ctypes))]
     extern "Rust" {
         #[lang = "oom"]
         fn oom_impl(layout: Layout) -> !;