Skip to content

Commit 3124fa9

Browse files
committed
Document ControlFlowGraph
1 parent f514493 commit 3124fa9

File tree

1 file changed

+2
-4
lines changed
  • compiler/rustc_data_structures/src/graph

1 file changed

+2
-4
lines changed

compiler/rustc_data_structures/src/graph/mod.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,8 @@ pub trait Predecessors: DirectedGraph {
4444
fn predecessors(&self, node: Self::Node) -> Self::Predecessors<'_>;
4545
}
4646

47-
pub trait ControlFlowGraph: DirectedGraph + StartNode + Predecessors + Successors {
48-
// convenient trait
49-
}
50-
47+
/// Alias for [`DirectedGraph`] + [`StartNode`] + [`Predecessors`] + [`Successors`].
48+
pub trait ControlFlowGraph: DirectedGraph + StartNode + Predecessors + Successors {}
5149
impl<T> ControlFlowGraph for T where T: DirectedGraph + StartNode + Predecessors + Successors {}
5250

5351
/// Returns `true` if the graph has a cycle that is reachable from the start node.

0 commit comments

Comments
 (0)