We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 27af5ed + 32aee06 commit 5518eb8Copy full SHA for 5518eb8
compiler/rustc_middle/src/mir/mod.rs
@@ -145,7 +145,7 @@ impl MirPhase {
145
}
146
"analysis" => Self::Analysis(AnalysisPhase::parse(phase)),
147
"runtime" => Self::Runtime(RuntimePhase::parse(phase)),
148
- _ => panic!("Unknown MIR dialect {}", dialect),
+ _ => bug!("Unknown MIR dialect: '{}'", dialect),
149
150
151
@@ -159,7 +159,7 @@ impl AnalysisPhase {
159
match &*phase.to_ascii_lowercase() {
160
"initial" => Self::Initial,
161
"post_cleanup" | "post-cleanup" | "postcleanup" => Self::PostCleanup,
162
- _ => panic!("Unknown analysis phase {}", phase),
+ _ => bug!("Unknown analysis phase: '{}'", phase),
163
164
165
@@ -174,7 +174,7 @@ impl RuntimePhase {
174
175
176
"optimized" => Self::Optimized,
177
- _ => panic!("Unknown runtime phase {}", phase),
+ _ => bug!("Unknown runtime phase: '{}'", phase),
178
179
180
0 commit comments