Skip to content

Commit

Permalink
Rollup merge of rust-lang#63572 - matklad:no-phase-fatal, r=estebank
Browse files Browse the repository at this point in the history
remove unused Level::PhaseFatal

r? @estebank
  • Loading branch information
Centril committed Aug 15, 2019
2 parents 8985e06 + ed7317c commit adcb9f6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/librustc_errors/annotate_snippet_emitter_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/librustc_errors/diagnostic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ impl Diagnostic {
match self.level {
Level::Bug |
Level::Fatal |
Level::PhaseFatal |
Level::Error |
Level::FailureNote => {
true
Expand Down
7 changes: 2 additions & 5 deletions src/librustc_errors/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
}
Expand All @@ -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",
Expand Down

0 comments on commit adcb9f6

Please sign in to comment.