From dc08f5519ff05a562f3ab5eda9b9b8fbc0cecfff Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Sat, 23 Mar 2019 11:37:15 +0100 Subject: [PATCH] Use resume_unwind instead of panic!() for nicer compiletest errors --- src/tools/compiletest/src/runtest.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 2021dd513aa62..05f47afe33063 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -3422,7 +3422,9 @@ impl ProcRes { \n", self.status, self.cmdline, self.stdout, self.stderr ); - panic!(); + // Use resume_unwind instead of panic!() to prevent a panic message + backtrace from + // compiletest, which is unnecessary noise. + std::panic::resume_unwind(Box::new(())); } }