diff options
| author | bors <bors@rust-lang.org> | 2024-04-16 06:41:11 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-16 06:41:11 +0000 |
| commit | 88d1a1c6fdf6e607606876cdab672eebdf6a3c71 (patch) | |
| tree | 438ae4e11b312666a2c073fff0184ec42aa7274f /compiler/rustc_data_structures/src/graph/reference.rs | |
| parent | 2f08c2c96501990caab0e47a095d76ffd6a31f16 (diff) | |
| parent | 3d3a584e4d88a572d68d7996122cda69a38dcf2e (diff) | |
| download | rust-88d1a1c6fdf6e607606876cdab672eebdf6a3c71.tar.gz rust-88d1a1c6fdf6e607606876cdab672eebdf6a3c71.zip | |
Auto merge of #3469 - rust-lang:rustup-2024-04-16, r=RalfJung
Automatic Rustup
Diffstat (limited to 'compiler/rustc_data_structures/src/graph/reference.rs')
| -rw-r--r-- | compiler/rustc_data_structures/src/graph/reference.rs | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/compiler/rustc_data_structures/src/graph/reference.rs b/compiler/rustc_data_structures/src/graph/reference.rs index c259fe56c15..7a487552f53 100644 --- a/compiler/rustc_data_structures/src/graph/reference.rs +++ b/compiler/rustc_data_structures/src/graph/reference.rs @@ -2,38 +2,26 @@ use super::*; impl<'graph, G: DirectedGraph> DirectedGraph for &'graph G { type Node = G::Node; -} -impl<'graph, G: WithNumNodes> WithNumNodes for &'graph G { fn num_nodes(&self) -> usize { (**self).num_nodes() } } -impl<'graph, G: WithStartNode> WithStartNode for &'graph G { +impl<'graph, G: StartNode> StartNode for &'graph G { fn start_node(&self) -> Self::Node { (**self).start_node() } } -impl<'graph, G: WithSuccessors> WithSuccessors for &'graph G { - fn successors(&self, node: Self::Node) -> <Self as GraphSuccessors<'_>>::Iter { +impl<'graph, G: Successors> Successors for &'graph G { + fn successors(&self, node: Self::Node) -> impl Iterator<Item = Self::Node> { (**self).successors(node) } } -impl<'graph, G: WithPredecessors> WithPredecessors for &'graph G { - fn predecessors(&self, node: Self::Node) -> <Self as GraphPredecessors<'_>>::Iter { +impl<'graph, G: Predecessors> Predecessors for &'graph G { + fn predecessors(&self, node: Self::Node) -> impl Iterator<Item = Self::Node> { (**self).predecessors(node) } } - -impl<'iter, 'graph, G: WithPredecessors> GraphPredecessors<'iter> for &'graph G { - type Item = G::Node; - type Iter = <G as GraphPredecessors<'iter>>::Iter; -} - -impl<'iter, 'graph, G: WithSuccessors> GraphSuccessors<'iter> for &'graph G { - type Item = G::Node; - type Iter = <G as GraphSuccessors<'iter>>::Iter; -} |
