Skip to content

Commit

Permalink
Rollup merge of #112738 - matthiaskrgr:ice_msg, r=oli-obk
Browse files Browse the repository at this point in the history
make ice msg "Unknown runtime phase" a bit nicer
  • Loading branch information
matthiaskrgr authored Jun 17, 2023
2 parents 27af5ed + 32aee06 commit 5518eb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_middle/src/mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl MirPhase {
}
"analysis" => Self::Analysis(AnalysisPhase::parse(phase)),
"runtime" => Self::Runtime(RuntimePhase::parse(phase)),
_ => panic!("Unknown MIR dialect {}", dialect),
_ => bug!("Unknown MIR dialect: '{}'", dialect),
}
}
}
Expand All @@ -159,7 +159,7 @@ impl AnalysisPhase {
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),
}
}
}
Expand All @@ -174,7 +174,7 @@ impl RuntimePhase {
"initial" => Self::Initial,
"post_cleanup" | "post-cleanup" | "postcleanup" => Self::PostCleanup,
"optimized" => Self::Optimized,
_ => panic!("Unknown runtime phase {}", phase),
_ => bug!("Unknown runtime phase: '{}'", phase),
}
}
}
Expand Down

0 comments on commit 5518eb8

Please sign in to comment.