From 308fd59f42dff89e55dff1c7a85fa9fa2411cab3 Mon Sep 17 00:00:00 2001 From: Scott McMurray Date: Sun, 5 Dec 2021 20:17:35 -0800 Subject: Stop enabling `in_band_lifetimes` in rustc_data_structures There's a conversation in the tracking issue about possibly unaccepting `in_band_lifetimes`, but it's used heavily in the compiler, and thus there'd need to be a bunch of PRs like this if that were to happen. So here's one to see how much of an impact it has. (Oh, and I removed `nll` while I was here too, since it didn't seem needed. Let me know if I should put that back.) --- compiler/rustc_data_structures/src/graph/iterate/mod.rs | 6 +++--- compiler/rustc_data_structures/src/graph/scc/mod.rs | 2 +- compiler/rustc_data_structures/src/graph/vec_graph/mod.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'compiler/rustc_data_structures/src/graph') diff --git a/compiler/rustc_data_structures/src/graph/iterate/mod.rs b/compiler/rustc_data_structures/src/graph/iterate/mod.rs index a9db3497b23..57007611a76 100644 --- a/compiler/rustc_data_structures/src/graph/iterate/mod.rs +++ b/compiler/rustc_data_structures/src/graph/iterate/mod.rs @@ -79,7 +79,7 @@ where visited: BitSet, } -impl DepthFirstSearch<'graph, G> +impl<'graph, G> DepthFirstSearch<'graph, G> where G: ?Sized + DirectedGraph + WithNumNodes + WithSuccessors, { @@ -209,7 +209,7 @@ where settled: BitSet, } -impl TriColorDepthFirstSearch<'graph, G> +impl<'graph, G> TriColorDepthFirstSearch<'graph, G> where G: ?Sized + DirectedGraph + WithNumNodes + WithSuccessors, { @@ -276,7 +276,7 @@ where } } -impl TriColorDepthFirstSearch<'graph, G> +impl TriColorDepthFirstSearch<'_, G> where G: ?Sized + DirectedGraph + WithNumNodes + WithSuccessors + WithStartNode, { diff --git a/compiler/rustc_data_structures/src/graph/scc/mod.rs b/compiler/rustc_data_structures/src/graph/scc/mod.rs index b84f28b6a9e..508a084b311 100644 --- a/compiler/rustc_data_structures/src/graph/scc/mod.rs +++ b/compiler/rustc_data_structures/src/graph/scc/mod.rs @@ -97,7 +97,7 @@ impl WithNumEdges for Sccs { } } -impl GraphSuccessors<'graph> for Sccs { +impl<'graph, N: Idx, S: Idx> GraphSuccessors<'graph> for Sccs { type Item = S; type Iter = std::iter::Cloned>; 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 4ed88878418..5d9bc1b2e51 100644 --- a/compiler/rustc_data_structures/src/graph/vec_graph/mod.rs +++ b/compiler/rustc_data_structures/src/graph/vec_graph/mod.rs @@ -94,7 +94,7 @@ impl WithNumEdges for VecGraph { } } -impl GraphSuccessors<'graph> for VecGraph { +impl<'graph, N: Idx> GraphSuccessors<'graph> for VecGraph { type Item = N; type Iter = std::iter::Cloned>; -- cgit 1.4.1-3-g733a5