diff options
| author | Jeremy Stucki <jeremy@myelin.ch> | 2019-06-21 18:51:27 +0200 |
|---|---|---|
| committer | Jeremy Stucki <stucki.jeremy@gmail.com> | 2019-07-03 10:01:01 +0200 |
| commit | 6ae80cf23f744566f2822861291abcfcdc6af5ce (patch) | |
| tree | 5b36d5eb40c99ee9892b05e6c94e367d3f4d9302 /src/librustc_data_structures | |
| parent | 0477e072723438054ef8628ec33223cf94bacb69 (diff) | |
| download | rust-6ae80cf23f744566f2822861291abcfcdc6af5ce.tar.gz rust-6ae80cf23f744566f2822861291abcfcdc6af5ce.zip | |
Remove needless lifetimes
Diffstat (limited to 'src/librustc_data_structures')
| -rw-r--r-- | src/librustc_data_structures/graph/mod.rs | 12 | ||||
| -rw-r--r-- | src/librustc_data_structures/graph/reference.rs | 8 | ||||
| -rw-r--r-- | src/librustc_data_structures/graph/test.rs | 8 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/librustc_data_structures/graph/mod.rs b/src/librustc_data_structures/graph/mod.rs index 2787fa3c6b1..e59085a9e3a 100644 --- a/src/librustc_data_structures/graph/mod.rs +++ b/src/librustc_data_structures/graph/mod.rs @@ -26,10 +26,10 @@ pub trait WithSuccessors: DirectedGraph where Self: for<'graph> GraphSuccessors<'graph, Item = <Self as DirectedGraph>::Node>, { - fn successors<'graph>( - &'graph self, + fn successors( + &self, node: Self::Node, - ) -> <Self as GraphSuccessors<'graph>>::Iter; + ) -> <Self as GraphSuccessors<'_>>::Iter; fn depth_first_search(&self, from: Self::Node) -> iterate::DepthFirstSearch<'_, Self> where @@ -48,10 +48,10 @@ pub trait WithPredecessors: DirectedGraph where Self: for<'graph> GraphPredecessors<'graph, Item = <Self as DirectedGraph>::Node>, { - fn predecessors<'graph>( - &'graph self, + fn predecessors( + &self, node: Self::Node, - ) -> <Self as GraphPredecessors<'graph>>::Iter; + ) -> <Self as GraphPredecessors<'_>>::Iter; } pub trait GraphPredecessors<'graph> { diff --git a/src/librustc_data_structures/graph/reference.rs b/src/librustc_data_structures/graph/reference.rs index 5ad2a71e1d7..9442bb3cdec 100644 --- a/src/librustc_data_structures/graph/reference.rs +++ b/src/librustc_data_structures/graph/reference.rs @@ -17,15 +17,15 @@ impl<'graph, G: WithStartNode> WithStartNode for &'graph G { } impl<'graph, G: WithSuccessors> WithSuccessors for &'graph G { - fn successors<'iter>(&'iter self, node: Self::Node) -> <Self as GraphSuccessors<'iter>>::Iter { + fn successors(&self, node: Self::Node) -> <Self as GraphSuccessors<'_>>::Iter { (**self).successors(node) } } impl<'graph, G: WithPredecessors> WithPredecessors for &'graph G { - fn predecessors<'iter>(&'iter self, - node: Self::Node) - -> <Self as GraphPredecessors<'iter>>::Iter { + fn predecessors(&self, + node: Self::Node) + -> <Self as GraphPredecessors<'_>>::Iter { (**self).predecessors(node) } } diff --git a/src/librustc_data_structures/graph/test.rs b/src/librustc_data_structures/graph/test.rs index b390c419572..5ff0cbf58c7 100644 --- a/src/librustc_data_structures/graph/test.rs +++ b/src/librustc_data_structures/graph/test.rs @@ -51,15 +51,15 @@ impl WithNumNodes for TestGraph { } impl WithPredecessors for TestGraph { - fn predecessors<'graph>(&'graph self, - node: usize) - -> <Self as GraphPredecessors<'graph>>::Iter { + fn predecessors(&self, + node: usize) + -> <Self as GraphPredecessors<'_>>::Iter { self.predecessors[&node].iter().cloned() } } impl WithSuccessors for TestGraph { - fn successors<'graph>(&'graph self, node: usize) -> <Self as GraphSuccessors<'graph>>::Iter { + fn successors(&self, node: usize) -> <Self as GraphSuccessors>::Iter { self.successors[&node].iter().cloned() } } |
