We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ControlFlowGraph
1 parent f514493 commit 3124fa9Copy full SHA for 3124fa9
compiler/rustc_data_structures/src/graph/mod.rs
@@ -44,10 +44,8 @@ pub trait Predecessors: DirectedGraph {
44
fn predecessors(&self, node: Self::Node) -> Self::Predecessors<'_>;
45
}
46
47
-pub trait ControlFlowGraph: DirectedGraph + StartNode + Predecessors + Successors {
48
- // convenient trait
49
-}
50
-
+/// Alias for [`DirectedGraph`] + [`StartNode`] + [`Predecessors`] + [`Successors`].
+pub trait ControlFlowGraph: DirectedGraph + StartNode + Predecessors + Successors {}
51
impl<T> ControlFlowGraph for T where T: DirectedGraph + StartNode + Predecessors + Successors {}
52
53
/// Returns `true` if the graph has a cycle that is reachable from the start node.
0 commit comments