}
}
-impl Display for MirPhase {
- fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
- f.write_str(self.name())
- }
-}
-
/// Where a specific `mir::Body` comes from.
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
#[derive(HashStable, TyEncodable, TyDecodable, TypeFoldable, TypeVisitable)]
dump_mir_for_phase_change(tcx, body);
if validate || new_phase == MirPhase::Runtime(RuntimePhase::Optimized) {
- validate_body(tcx, body, format!("after phase change to {}", new_phase));
+ validate_body(tcx, body, format!("after phase change to {}", new_phase.name()));
}
body.pass_count = 1;