]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/alloc.rs
Rollup merge of #105859 - compiler-errors:hr-lifetime-add, r=davidtwco
[rust.git] / library / std / src / alloc.rs
index 61c1ff578b2cad4ec3f8c46b09bd71ab80ef0d1b..c5a5991cc81c47d340a3b7b113c56339671acd7e 100644 (file)
@@ -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());
     }