add ICE error level

This commit is contained in:
Ralf Jung 2022-06-16 11:02:54 -07:00
parent e7507d6720
commit e70c631a3b

View File

@ -16,6 +16,7 @@ struct RustcMessage {
#[derive(Copy, Clone, Debug, PartialOrd, Ord, PartialEq, Eq)]
pub(crate) enum Level {
Ice = 5,
Error = 4,
Warn = 3,
Help = 2,
@ -52,6 +53,7 @@ impl std::str::FromStr for Level {
"HELP" | "help" => Ok(Self::Help),
"NOTE" | "note" => Ok(Self::Note),
"failure-note" => Ok(Self::FailureNote),
"error: internal compiler error" => Ok(Self::Ice),
_ => Err(format!("unknown level `{s}`")),
}
}