about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-08-15 14:34:05 +0200
committerGitHub <noreply@github.com>2019-08-15 14:34:05 +0200
commitb1bbd52a59462c635c7cece92c2212df52da5adc (patch)
tree9a5848fd79ee1550fb8d740790de02330c6d418d
parente4527380004d3c5f64d7f2ed34cafe3f182f847a (diff)
parented7317cebe71db1745267f1039960d0c48458f59 (diff)
Rollup merge of #63572 - matklad:no-phase-fatal, r=estebank
remove unused Level::PhaseFatal

r? @estebank
-rw-r--r--src/librustc_errors/annotate_snippet_emitter_writer.rs2
-rw-r--r--src/librustc_errors/diagnostic.rs1
-rw-r--r--src/librustc_errors/lib.rs7
3 files changed, 3 insertions, 7 deletions
diff --git a/src/librustc_errors/annotate_snippet_emitter_writer.rs b/src/librustc_errors/annotate_snippet_emitter_writer.rs
index 96a9b6c5c4f..255af3122e7 100644
--- a/src/librustc_errors/annotate_snippet_emitter_writer.rs
+++ b/src/librustc_errors/annotate_snippet_emitter_writer.rs
@@ -148,7 +148,7 @@ impl<'a>  DiagnosticConverter<'a> {
     /// Maps `Diagnostic::Level` to `snippet::AnnotationType`
     fn annotation_type_for_level(level: Level) -> AnnotationType {
         match level {
-            Level::Bug | Level::Fatal | Level::PhaseFatal | Level::Error => AnnotationType::Error,
+            Level::Bug | Level::Fatal | Level::Error => AnnotationType::Error,
             Level::Warning => AnnotationType::Warning,
             Level::Note => AnnotationType::Note,
             Level::Help => AnnotationType::Help,
diff --git a/src/librustc_errors/diagnostic.rs b/src/librustc_errors/diagnostic.rs
index e11ba75da98..3f1b91256c4 100644
--- a/src/librustc_errors/diagnostic.rs
+++ b/src/librustc_errors/diagnostic.rs
@@ -94,7 +94,6 @@ impl Diagnostic {
         match self.level {
             Level::Bug |
             Level::Fatal |
-            Level::PhaseFatal |
             Level::Error |
             Level::FailureNote => {
                 true
diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs
index 3b6a6a824c8..f3e524152ff 100644
--- a/src/librustc_errors/lib.rs
+++ b/src/librustc_errors/lib.rs
@@ -787,9 +787,6 @@ 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,
@@ -808,7 +805,7 @@ impl Level {
     fn color(self) -> ColorSpec {
         let mut spec = ColorSpec::new();
         match self {
-            Bug | Fatal | PhaseFatal | Error => {
+            Bug | Fatal | Error => {
                 spec.set_fg(Some(Color::Red))
                     .set_intense(true);
             }
@@ -833,7 +830,7 @@ impl Level {
     pub fn to_str(self) -> &'static str {
         match self {
             Bug => "error: internal compiler error",
-            Fatal | PhaseFatal | Error => "error",
+            Fatal | Error => "error",
             Warning => "warning",
             Note => "note",
             Help => "help",