about summary refs log tree commit diff
path: root/tests/ui/alloc-error/default-alloc-error-hook.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-04-25 00:08:35 +0200
committerMatthias Krüger <matthias.krueger@famsik.de>2023-04-25 00:08:35 +0200
commitf54dbe6e3116a475f63b580884f07474239a0b25 (patch)
tree0b806920a4a86480c1a59c8cc126525d38310216 /tests/ui/alloc-error/default-alloc-error-hook.rs
parent33253fa6a42565eeae40e63401a41ac2dcc9e92f (diff)
downloadrust-f54dbe6e3116a475f63b580884f07474239a0b25.tar.gz
rust-f54dbe6e3116a475f63b580884f07474239a0b25.zip
Revert "Remove #[alloc_error_handler] from the compiler and library"
This reverts commit abc0660118cc95f47445fd33502a11dd448f5968.
Diffstat (limited to 'tests/ui/alloc-error/default-alloc-error-hook.rs')
-rw-r--r--tests/ui/alloc-error/default-alloc-error-hook.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui/alloc-error/default-alloc-error-hook.rs b/tests/ui/alloc-error/default-alloc-error-hook.rs
index 919d4b714a1..8be09500f4e 100644
--- a/tests/ui/alloc-error/default-alloc-error-hook.rs
+++ b/tests/ui/alloc-error/default-alloc-error-hook.rs
@@ -2,7 +2,7 @@
 // ignore-emscripten no processes
 // ignore-sgx no processes
 
-use std::alloc::{handle_alloc_error, Layout};
+use std::alloc::{Layout, handle_alloc_error};
 use std::env;
 use std::process::Command;
 use std::str;
@@ -24,5 +24,5 @@ fn main() {
         .strip_suffix("qemu: uncaught target signal 6 (Aborted) - core dumped\n")
         .unwrap_or(stderr);
 
-    assert!(stderr.contains("memory allocation of 42 bytes failed"));
+    assert_eq!(stderr, "memory allocation of 42 bytes failed\n");
 }