diff options
| author | Josh Stone <jistone@redhat.com> | 2019-09-20 15:39:34 -0700 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2019-09-20 15:39:34 -0700 |
| commit | 9f374da46781cfe2d297636fe97b2fd9647cb1d9 (patch) | |
| tree | 0b6cd213056e9d3f998ecba07f6047a1c8c1bd3f /src/liballoc/alloc.rs | |
| parent | 9ad1e7c46cf690b7ec6953b142430d21ca2d8799 (diff) | |
| download | rust-9f374da46781cfe2d297636fe97b2fd9647cb1d9.tar.gz rust-9f374da46781cfe2d297636fe97b2fd9647cb1d9.zip | |
Exempt extern "Rust" from improper_ctypes
It should be fine for Rust ABIs to involve any Rust type.
Diffstat (limited to 'src/liballoc/alloc.rs')
| -rw-r--r-- | src/liballoc/alloc.rs | 2 |
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) -> !; |
