Rollup merge of #112738 - matthiaskrgr:ice_msg, r=oli-obk
make ice msg "Unknown runtime phase" a bit nicer
This commit is contained in:
commit
5518eb863f
@ -145,7 +145,7 @@ pub fn parse(dialect: String, phase: Option<String>) -> Self {
|
||||
}
|
||||
"analysis" => Self::Analysis(AnalysisPhase::parse(phase)),
|
||||
"runtime" => Self::Runtime(RuntimePhase::parse(phase)),
|
||||
_ => panic!("Unknown MIR dialect {}", dialect),
|
||||
_ => bug!("Unknown MIR dialect: '{}'", dialect),
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -159,7 +159,7 @@ pub fn parse(phase: Option<String>) -> Self {
|
||||
match &*phase.to_ascii_lowercase() {
|
||||
"initial" => Self::Initial,
|
||||
"post_cleanup" | "post-cleanup" | "postcleanup" => Self::PostCleanup,
|
||||
_ => panic!("Unknown analysis phase {}", phase),
|
||||
_ => bug!("Unknown analysis phase: '{}'", phase),
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -174,7 +174,7 @@ pub fn parse(phase: Option<String>) -> Self {
|
||||
"initial" => Self::Initial,
|
||||
"post_cleanup" | "post-cleanup" | "postcleanup" => Self::PostCleanup,
|
||||
"optimized" => Self::Optimized,
|
||||
_ => panic!("Unknown runtime phase {}", phase),
|
||||
_ => bug!("Unknown runtime phase: '{}'", phase),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user