Skip to content

Commit f14a887

Browse files
committed
Move is_cfg_cyclic from Body to BasicBlocks
1 parent 1eb1d91 commit f14a887

File tree

2 files changed

+1
-7
lines changed
  • compiler

2 files changed

+1
-7
lines changed

compiler/rustc_middle/src/mir/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,6 @@ impl<'tcx> Body<'tcx> {
341341
self.basic_blocks.as_mut()
342342
}
343343

344-
/// Returns `true` if a cycle exists in the control-flow graph that is reachable from the
345-
/// `START_BLOCK`.
346-
pub fn is_cfg_cyclic(&self) -> bool {
347-
self.basic_blocks.is_cfg_cyclic()
348-
}
349-
350344
#[inline]
351345
pub fn local_kind(&self, local: Local) -> LocalKind {
352346
let index = local.as_usize();

compiler/rustc_mir_dataflow/src/framework/engine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ where
101101
// transfer function for each block exactly once (assuming that we process blocks in RPO).
102102
//
103103
// In this case, there's no need to compute the block transfer functions ahead of time.
104-
if !body.is_cfg_cyclic() {
104+
if !body.basic_blocks.is_cfg_cyclic() {
105105
return Self::new(tcx, body, analysis, None);
106106
}
107107

0 commit comments

Comments
 (0)