about summary refs log tree commit diff
path: root/src/libsyntax_ext
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax_ext')
-rw-r--r--src/libsyntax_ext/deriving/custom.rs6
-rw-r--r--src/libsyntax_ext/proc_macro_impl.rs4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax_ext/deriving/custom.rs b/src/libsyntax_ext/deriving/custom.rs
index f375847e705..22e78e9b426 100644
--- a/src/libsyntax_ext/deriving/custom.rs
+++ b/src/libsyntax_ext/deriving/custom.rs
@@ -92,7 +92,7 @@ impl MultiItemModifier for ProcMacroDerive {
                 }
 
                 err.emit();
-                panic!(FatalError);
+                FatalError.raise();
             }
         };
 
@@ -103,13 +103,13 @@ impl MultiItemModifier for ProcMacroDerive {
                 // fail if there have been errors emitted
                 Ok(_) if ecx.parse_sess.span_diagnostic.err_count() > error_count_before => {
                     ecx.struct_span_fatal(span, msg).emit();
-                    panic!(FatalError);
+                    FatalError.raise();
                 }
                 Ok(new_items) => new_items.into_iter().map(Annotatable::Item).collect(),
                 Err(_) => {
                     // FIXME: handle this better
                     ecx.struct_span_fatal(span, msg).emit();
-                    panic!(FatalError);
+                    FatalError.raise();
                 }
             }
         })
diff --git a/src/libsyntax_ext/proc_macro_impl.rs b/src/libsyntax_ext/proc_macro_impl.rs
index 5fcedbf50c6..12400e363f4 100644
--- a/src/libsyntax_ext/proc_macro_impl.rs
+++ b/src/libsyntax_ext/proc_macro_impl.rs
@@ -51,7 +51,7 @@ impl base::AttrProcMacro for AttrProcMacro {
                 }
 
                 err.emit();
-                panic!(FatalError);
+                FatalError.raise();
             }
         }
     }
@@ -86,7 +86,7 @@ impl base::ProcMacro for BangProcMacro {
                 }
 
                 err.emit();
-                panic!(FatalError);
+                FatalError.raise();
             }
         }
     }