From 0ac8915875596db90167701c447d9c76396358bb Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Wed, 20 Jan 2016 22:07:33 +1300 Subject: The war on abort_if_errors --- src/libsyntax/errors/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/libsyntax/errors') diff --git a/src/libsyntax/errors/mod.rs b/src/libsyntax/errors/mod.rs index 6983c74696a..a7a4ddc3b2a 100644 --- a/src/libsyntax/errors/mod.rs +++ b/src/libsyntax/errors/mod.rs @@ -555,6 +555,9 @@ impl Handler { pub enum Level { Bug, Fatal, + // An error which while not immediately fatal, should stop the compiler + // progressing beyond the current phase. + PhaseFatal, Error, Warning, Note, @@ -573,7 +576,7 @@ impl fmt::Display for Level { impl Level { fn color(self) -> term::color::Color { match self { - Bug | Fatal | Error => term::color::BRIGHT_RED, + Bug | Fatal | PhaseFatal | Error => term::color::BRIGHT_RED, Warning => term::color::BRIGHT_YELLOW, Note => term::color::BRIGHT_GREEN, Help => term::color::BRIGHT_CYAN, @@ -584,7 +587,7 @@ impl Level { fn to_str(self) -> &'static str { match self { Bug => "error: internal compiler error", - Fatal | Error => "error", + Fatal | PhaseFatal | Error => "error", Warning => "warning", Note => "note", Help => "help", -- cgit 1.4.1-3-g733a5