Drive-by cleanup: debug::term_type
=> TerminatorKind::name
This commit is contained in:
parent
03d5f9b783
commit
f542778533
4 changed files with 32 additions and 32 deletions
|
@ -25,7 +25,6 @@
|
|||
//! to: `rustc_span::create_default_session_globals_then(|| { test_here(); })`.
|
||||
|
||||
use super::counters;
|
||||
use super::debug;
|
||||
use super::graph;
|
||||
use super::spans;
|
||||
|
||||
|
@ -188,12 +187,12 @@ fn debug_basic_blocks(mir_body: &Body<'_>) -> String {
|
|||
| TerminatorKind::Goto { target }
|
||||
| TerminatorKind::InlineAsm { destination: Some(target), .. }
|
||||
| TerminatorKind::Yield { resume: target, .. } => {
|
||||
format!("{}{:?}:{} -> {:?}", sp, bb, debug::term_type(kind), target)
|
||||
format!("{}{:?}:{} -> {:?}", sp, bb, kind.name(), target)
|
||||
}
|
||||
TerminatorKind::SwitchInt { targets, .. } => {
|
||||
format!("{}{:?}:{} -> {:?}", sp, bb, debug::term_type(kind), targets)
|
||||
format!("{}{:?}:{} -> {:?}", sp, bb, kind.name(), targets)
|
||||
}
|
||||
_ => format!("{}{:?}:{}", sp, bb, debug::term_type(kind)),
|
||||
_ => format!("{}{:?}:{}", sp, bb, kind.name()),
|
||||
}
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
|
@ -215,7 +214,7 @@ fn print_mir_graphviz(name: &str, mir_body: &Body<'_>) {
|
|||
" {:?} [label=\"{:?}: {}\"];\n{}",
|
||||
bb,
|
||||
bb,
|
||||
debug::term_type(&data.terminator().kind),
|
||||
data.terminator().kind.name(),
|
||||
mir_body
|
||||
.basic_blocks
|
||||
.successors(bb)
|
||||
|
@ -244,7 +243,7 @@ fn print_coverage_graphviz(
|
|||
" {:?} [label=\"{:?}: {}\"];\n{}",
|
||||
bcb,
|
||||
bcb,
|
||||
debug::term_type(&bcb_data.terminator(mir_body).kind),
|
||||
bcb_data.terminator(mir_body).kind.name(),
|
||||
basic_coverage_blocks
|
||||
.successors(bcb)
|
||||
.map(|successor| { format!(" {:?} -> {:?};", bcb, successor) })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue