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/vec_graph/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'compiler/rustc_data_structures/src/graph/vec_graph') diff --git a/compiler/rustc_data_structures/src/graph/vec_graph/mod.rs b/compiler/rustc_data_structures/src/graph/vec_graph/mod.rs index 3f9d8ec0aca..26c86469fad 100644 --- a/compiler/rustc_data_structures/src/graph/vec_graph/mod.rs +++ b/compiler/rustc_data_structures/src/graph/vec_graph/mod.rs @@ -93,9 +93,7 @@ impl NumEdges for VecGraph { } impl Successors for VecGraph { - type Successors<'g> = std::iter::Cloned>; - - fn successors(&self, node: N) -> Self::Successors<'_> { + fn successors(&self, node: N) -> impl Iterator { self.successors(node).iter().cloned() } } -- cgit 1.4.1-3-g733a5