remove unused Level::PhaseFatal
This commit is contained in:
parent
c43d03a19f
commit
ed7317cebe
3 changed files with 3 additions and 7 deletions
|
@ -148,7 +148,7 @@ impl<'a> DiagnosticConverter<'a> {
|
||||||
/// Maps `Diagnostic::Level` to `snippet::AnnotationType`
|
/// Maps `Diagnostic::Level` to `snippet::AnnotationType`
|
||||||
fn annotation_type_for_level(level: Level) -> AnnotationType {
|
fn annotation_type_for_level(level: Level) -> AnnotationType {
|
||||||
match level {
|
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::Warning => AnnotationType::Warning,
|
||||||
Level::Note => AnnotationType::Note,
|
Level::Note => AnnotationType::Note,
|
||||||
Level::Help => AnnotationType::Help,
|
Level::Help => AnnotationType::Help,
|
||||||
|
|
|
@ -94,7 +94,6 @@ impl Diagnostic {
|
||||||
match self.level {
|
match self.level {
|
||||||
Level::Bug |
|
Level::Bug |
|
||||||
Level::Fatal |
|
Level::Fatal |
|
||||||
Level::PhaseFatal |
|
|
||||||
Level::Error |
|
Level::Error |
|
||||||
Level::FailureNote => {
|
Level::FailureNote => {
|
||||||
true
|
true
|
||||||
|
|
|
@ -787,9 +787,6 @@ impl Handler {
|
||||||
pub enum Level {
|
pub enum Level {
|
||||||
Bug,
|
Bug,
|
||||||
Fatal,
|
Fatal,
|
||||||
// An error which while not immediately fatal, should stop the compiler
|
|
||||||
// progressing beyond the current phase.
|
|
||||||
PhaseFatal,
|
|
||||||
Error,
|
Error,
|
||||||
Warning,
|
Warning,
|
||||||
Note,
|
Note,
|
||||||
|
@ -808,7 +805,7 @@ impl Level {
|
||||||
fn color(self) -> ColorSpec {
|
fn color(self) -> ColorSpec {
|
||||||
let mut spec = ColorSpec::new();
|
let mut spec = ColorSpec::new();
|
||||||
match self {
|
match self {
|
||||||
Bug | Fatal | PhaseFatal | Error => {
|
Bug | Fatal | Error => {
|
||||||
spec.set_fg(Some(Color::Red))
|
spec.set_fg(Some(Color::Red))
|
||||||
.set_intense(true);
|
.set_intense(true);
|
||||||
}
|
}
|
||||||
|
@ -833,7 +830,7 @@ impl Level {
|
||||||
pub fn to_str(self) -> &'static str {
|
pub fn to_str(self) -> &'static str {
|
||||||
match self {
|
match self {
|
||||||
Bug => "error: internal compiler error",
|
Bug => "error: internal compiler error",
|
||||||
Fatal | PhaseFatal | Error => "error",
|
Fatal | Error => "error",
|
||||||
Warning => "warning",
|
Warning => "warning",
|
||||||
Note => "note",
|
Note => "note",
|
||||||
Help => "help",
|
Help => "help",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue