]> git.lizzy.rs Git - rust.git/commitdiff
Use resume_unwind instead of panic!() for nicer compiletest errors
authorbjorn3 <bjorn3@users.noreply.github.com>
Sat, 23 Mar 2019 10:37:15 +0000 (11:37 +0100)
committerbjorn3 <bjorn3@users.noreply.github.com>
Mon, 15 Apr 2019 16:03:30 +0000 (18:03 +0200)
src/tools/compiletest/src/runtest.rs

index 2021dd513aa6209c3207715f24c19c11c2899397..05f47afe330635820fd924bfb220c541aee8165f 100644 (file)
@@ -3422,7 +3422,9 @@ pub fn fatal(&self, err: Option<&str>) -> ! {
              \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(()));
     }
 }