diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2024-04-14 15:53:38 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2024-04-14 15:53:38 +0000 |
| commit | 3124fa93107d406dc77e56a0b8a5b372349a73ab (patch) | |
| tree | 1f4645de7de328d8b813c4cf448f09de4b0d3490 /compiler/rustc_data_structures/src | |
| parent | f5144938bd33af48a1b06fc5e11f7f30132be895 (diff) | |
| download | rust-3124fa93107d406dc77e56a0b8a5b372349a73ab.tar.gz rust-3124fa93107d406dc77e56a0b8a5b372349a73ab.zip | |
Document `ControlFlowGraph`
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/graph/mod.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_data_structures/src/graph/mod.rs b/compiler/rustc_data_structures/src/graph/mod.rs index 5758ffce676..189474395ee 100644 --- a/compiler/rustc_data_structures/src/graph/mod.rs +++ b/compiler/rustc_data_structures/src/graph/mod.rs @@ -44,10 +44,8 @@ pub trait Predecessors: DirectedGraph { fn predecessors(&self, node: Self::Node) -> Self::Predecessors<'_>; } -pub trait ControlFlowGraph: DirectedGraph + StartNode + Predecessors + Successors { - // convenient trait -} - +/// Alias for [`DirectedGraph`] + [`StartNode`] + [`Predecessors`] + [`Successors`]. +pub trait ControlFlowGraph: DirectedGraph + StartNode + Predecessors + Successors {} impl<T> ControlFlowGraph for T where T: DirectedGraph + StartNode + Predecessors + Successors {} /// Returns `true` if the graph has a cycle that is reachable from the start node. |
