diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2024-04-15 13:33:08 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2024-04-15 13:34:08 +0000 |
| commit | 435db9b9bd404c1bc632fbb6ade8b4ce92c2828c (patch) | |
| tree | a203fe3f701723487e869937d0446d11bb13779c /compiler/rustc_data_structures/src/graph/reference.rs | |
| parent | e8d2221e3bbb4e8971c97395463036ebd6e7b23d (diff) | |
| download | rust-435db9b9bd404c1bc632fbb6ade8b4ce92c2828c.tar.gz rust-435db9b9bd404c1bc632fbb6ade8b4ce92c2828c.zip | |
Use RPITIT for `Successors` and `Predecessors` traits
Now with RPITIT instead of GAT!
Diffstat (limited to 'compiler/rustc_data_structures/src/graph/reference.rs')
| -rw-r--r-- | compiler/rustc_data_structures/src/graph/reference.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_data_structures/src/graph/reference.rs b/compiler/rustc_data_structures/src/graph/reference.rs index 16b019374be..7a487552f53 100644 --- a/compiler/rustc_data_structures/src/graph/reference.rs +++ b/compiler/rustc_data_structures/src/graph/reference.rs @@ -15,17 +15,13 @@ impl<'graph, G: StartNode> StartNode for &'graph G { } impl<'graph, G: Successors> Successors for &'graph G { - type Successors<'g> = G::Successors<'g> where 'graph: 'g; - - fn successors(&self, node: Self::Node) -> Self::Successors<'_> { + fn successors(&self, node: Self::Node) -> impl Iterator<Item = Self::Node> { (**self).successors(node) } } impl<'graph, G: Predecessors> Predecessors for &'graph G { - type Predecessors<'g> = G::Predecessors<'g> where 'graph: 'g; - - fn predecessors(&self, node: Self::Node) -> Self::Predecessors<'_> { + fn predecessors(&self, node: Self::Node) -> impl Iterator<Item = Self::Node> { (**self).predecessors(node) } } |
