Skip to content

Commit 80dcc52

Browse files
committed
Remove an impl and replace its only use with a method call
1 parent 4f593ce commit 80dcc52

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

compiler/rustc_middle/src/mir/mod.rs

-6
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,6 @@ impl RuntimePhase {
178178
}
179179
}
180180

181-
impl Display for MirPhase {
182-
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
183-
f.write_str(self.name())
184-
}
185-
}
186-
187181
/// Where a specific `mir::Body` comes from.
188182
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
189183
#[derive(HashStable, TyEncodable, TyDecodable, TypeFoldable, TypeVisitable)]

compiler/rustc_mir_transform/src/pass_manager.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ fn run_passes_inner<'tcx>(
143143

144144
dump_mir_for_phase_change(tcx, body);
145145
if validate || new_phase == MirPhase::Runtime(RuntimePhase::Optimized) {
146-
validate_body(tcx, body, format!("after phase change to {}", new_phase));
146+
validate_body(tcx, body, format!("after phase change to {}", new_phase.name()));
147147
}
148148

149149
body.pass_count = 1;

0 commit comments

Comments
 (0)