Skip to content

Commit 9d2ebc2

Browse files
authored
Rollup merge of rust-lang#63572 - matklad:no-phase-fatal, r=estebank
remove unused Level::PhaseFatal r? @estebank
2 parents 5d0b7b6 + ed7317c commit 9d2ebc2

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

src/librustc_errors/annotate_snippet_emitter_writer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ impl<'a> DiagnosticConverter<'a> {
148148
/// Maps `Diagnostic::Level` to `snippet::AnnotationType`
149149
fn annotation_type_for_level(level: Level) -> AnnotationType {
150150
match level {
151-
Level::Bug | Level::Fatal | Level::PhaseFatal | Level::Error => AnnotationType::Error,
151+
Level::Bug | Level::Fatal | Level::Error => AnnotationType::Error,
152152
Level::Warning => AnnotationType::Warning,
153153
Level::Note => AnnotationType::Note,
154154
Level::Help => AnnotationType::Help,

src/librustc_errors/diagnostic.rs

-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ impl Diagnostic {
9494
match self.level {
9595
Level::Bug |
9696
Level::Fatal |
97-
Level::PhaseFatal |
9897
Level::Error |
9998
Level::FailureNote => {
10099
true

src/librustc_errors/lib.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -787,9 +787,6 @@ impl Handler {
787787
pub enum Level {
788788
Bug,
789789
Fatal,
790-
// An error which while not immediately fatal, should stop the compiler
791-
// progressing beyond the current phase.
792-
PhaseFatal,
793790
Error,
794791
Warning,
795792
Note,
@@ -808,7 +805,7 @@ impl Level {
808805
fn color(self) -> ColorSpec {
809806
let mut spec = ColorSpec::new();
810807
match self {
811-
Bug | Fatal | PhaseFatal | Error => {
808+
Bug | Fatal | Error => {
812809
spec.set_fg(Some(Color::Red))
813810
.set_intense(true);
814811
}
@@ -833,7 +830,7 @@ impl Level {
833830
pub fn to_str(self) -> &'static str {
834831
match self {
835832
Bug => "error: internal compiler error",
836-
Fatal | PhaseFatal | Error => "error",
833+
Fatal | Error => "error",
837834
Warning => "warning",
838835
Note => "note",
839836
Help => "help",

0 commit comments

Comments
 (0)