about summary refs log tree commit diff
path: root/src/libsyntax_ext
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2018-01-21 12:47:58 +0100
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2018-01-26 04:52:30 +0100
commit9a8d6b8bb5dd7dd2d378849f0c2fa586e3a5b48b (patch)
treeee04624362f08eb705597831fbc197b68c8d20a7 /src/libsyntax_ext
parent9fd7da904b46ff7aa78c2e2cc1986c4975aeccc6 (diff)
downloadrust-9a8d6b8bb5dd7dd2d378849f0c2fa586e3a5b48b.tar.gz
rust-9a8d6b8bb5dd7dd2d378849f0c2fa586e3a5b48b.zip
Do not capture stderr in the compiler. Instead just panic silently for fatal errors
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();
             }
         }
     }