about summary refs log tree commit diff
path: root/src/libsyntax/test.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/test.rs')
-rw-r--r--src/libsyntax/test.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/test.rs b/src/libsyntax/test.rs
index fbee11ee657..a3cfb647853 100644
--- a/src/libsyntax/test.rs
+++ b/src/libsyntax/test.rs
@@ -125,7 +125,7 @@ impl<'a> fold::Folder for TestHarnessGenerator<'a> {
             match i.node {
                 ast::ItemFn(_, ast::Unsafety::Unsafe, _, _, _) => {
                     let diag = self.cx.span_diagnostic;
-                    diag.span_fatal(i.span, "unsafe functions cannot be used for tests");
+                    panic!(diag.span_fatal(i.span, "unsafe functions cannot be used for tests"));
                 }
                 _ => {
                     debug!("this is a test function");