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/scc/mod.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/scc/mod.rs')
| -rw-r--r-- | compiler/rustc_data_structures/src/graph/scc/mod.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_data_structures/src/graph/scc/mod.rs b/compiler/rustc_data_structures/src/graph/scc/mod.rs index 1cd0edfe57f..5021e5e8fc0 100644 --- a/compiler/rustc_data_structures/src/graph/scc/mod.rs +++ b/compiler/rustc_data_structures/src/graph/scc/mod.rs @@ -104,9 +104,7 @@ impl<N: Idx, S: Idx + Ord> NumEdges for Sccs<N, S> { } impl<N: Idx, S: Idx + Ord> Successors for Sccs<N, S> { - type Successors<'g> = std::iter::Cloned<std::slice::Iter<'g, S>>; - - fn successors(&self, node: S) -> Self::Successors<'_> { + fn successors(&self, node: S) -> impl Iterator<Item = Self::Node> { self.successors(node).iter().cloned() } } |
