From 44570143989cdd529aff488b8fa5534c4802fbce Mon Sep 17 00:00:00 2001 From: Matthias Krüger Date: Fri, 15 Oct 2021 11:24:20 +0200 Subject: Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions_2, r=petrochenkov" The PR had some unforseen perf regressions that are not as easy to find. Revert the PR for now. This reverts commit 6ae8912a3e7d2c4c775024f58a7ba4b1aedc4073, reversing changes made to 86d6d2b7389fe1b339402c1798edae8b695fc9ef. --- compiler/rustc_data_structures/src/graph/implementation/mod.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_data_structures/src/graph/implementation') diff --git a/compiler/rustc_data_structures/src/graph/implementation/mod.rs b/compiler/rustc_data_structures/src/graph/implementation/mod.rs index 9ff401c3c7a..1aa7ac024d9 100644 --- a/compiler/rustc_data_structures/src/graph/implementation/mod.rs +++ b/compiler/rustc_data_structures/src/graph/implementation/mod.rs @@ -206,11 +206,17 @@ impl Graph { AdjacentEdges { graph: self, direction, next: first_edge } } - pub fn successor_nodes(&self, source: NodeIndex) -> impl Iterator + '_ { + pub fn successor_nodes<'a>( + &'a self, + source: NodeIndex, + ) -> impl Iterator + 'a { self.outgoing_edges(source).targets() } - pub fn predecessor_nodes(&self, target: NodeIndex) -> impl Iterator + '_ { + pub fn predecessor_nodes<'a>( + &'a self, + target: NodeIndex, + ) -> impl Iterator + 'a { self.incoming_edges(target).sources() } -- cgit 1.4.1-3-g733a5