about summary refs log tree commit diff
path: root/compiler/rustc_feature
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2020-09-07 10:45:20 +0200
committerHarald Hoyer <harald@redhat.com>2020-10-02 09:00:29 +0200
commitcadd12b5f020b9b2c7bb0c5e7078b81fbdcfb6d8 (patch)
treef08cb851bfe4d02d97b2b20748a9f0d69d225ed0 /compiler/rustc_feature
parentf283d3f02cf3ed261a519afe05cde9e23d1d9278 (diff)
downloadrust-cadd12b5f020b9b2c7bb0c5e7078b81fbdcfb6d8.tar.gz
rust-cadd12b5f020b9b2c7bb0c5e7078b81fbdcfb6d8.zip
Implement Make `handle_alloc_error` default to panic (for no_std + liballoc)
Related: https://github.com/rust-lang/rust/issues/66741

Guarded with `#![feature(default_alloc_error_handler)]` a default
`alloc_error_handler` is called, if a custom allocator is used and no
other custom `#[alloc_error_handler]` is defined.

The panic message does not contain the size anymore, because it would
pull in the fmt machinery, which would blow up the code size
significantly.
Diffstat (limited to 'compiler/rustc_feature')
-rw-r--r--compiler/rustc_feature/src/active.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs
index 060efd270dd..5cd0a56d524 100644
--- a/compiler/rustc_feature/src/active.rs
+++ b/compiler/rustc_feature/src/active.rs
@@ -593,6 +593,9 @@ declare_features! (
     /// Allows to use the `#[cmse_nonsecure_entry]` attribute.
     (active, cmse_nonsecure_entry, "1.48.0", Some(75835), None),
 
+    /// Allows rustc to inject a default alloc_error_handler
+    (active, default_alloc_error_handler, "1.48.0", Some(66741), None),
+
     // -------------------------------------------------------------------------
     // feature-group-end: actual feature gates
     // -------------------------------------------------------------------------