about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-12-22 16:32:08 +0100
committerRalf Jung <post@ralfj.de>2023-01-02 16:35:14 +0100
commit5974f6f0a53614e82df9430b95bcb6e9473265fa (patch)
tree297f665125ca8b90b06bcc98f90e5a322d602591 /library/std/src
parent731e0bf721c1ec2c7843547e86b6157b40a437d1 (diff)
downloadrust-5974f6f0a53614e82df9430b95bcb6e9473265fa.tar.gz
rust-5974f6f0a53614e82df9430b95bcb6e9473265fa.zip
default OOM handler: use non-unwinding panic (unless -Zoom=panic is set), to match std handler
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/alloc.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/alloc.rs b/library/std/src/alloc.rs
index 61c1ff578b2..c5a5991cc81 100644
--- a/library/std/src/alloc.rs
+++ b/library/std/src/alloc.rs
@@ -338,7 +338,7 @@ fn default_alloc_error_hook(layout: Layout) {
 
     #[allow(unused_unsafe)]
     if unsafe { __rust_alloc_error_handler_should_panic != 0 } {
-        panic!("memory allocation of {} bytes failed\n", layout.size());
+        panic!("memory allocation of {} bytes failed", layout.size());
     } else {
         rtprintpanic!("memory allocation of {} bytes failed\n", layout.size());
     }