Auto merge of #2237 - RalfJung:ice, r=oli-obk

add ICE error level

Fixes https://github.com/rust-lang/miri/issues/2235

But I am not sure if anything else should be adjusted when adding a new error level...
This commit is contained in:
bors
2022-06-16 20:26:12 +00:00
+2
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 @@ fn from_str(s: &str) -> Result<Self, Self::Err> {
"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}`")),
}
}