From 435db9b9bd404c1bc632fbb6ade8b4ce92c2828c Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Mon, 15 Apr 2024 13:33:08 +0000 Subject: Use RPITIT for `Successors` and `Predecessors` traits Now with RPITIT instead of GAT! --- compiler/rustc_data_structures/src/graph/scc/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'compiler/rustc_data_structures/src/graph/scc') 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 NumEdges for Sccs { } impl Successors for Sccs { - type Successors<'g> = std::iter::Cloned>; - - fn successors(&self, node: S) -> Self::Successors<'_> { + fn successors(&self, node: S) -> impl Iterator { self.successors(node).iter().cloned() } } -- cgit 1.4.1-3-g733a5