diff options
| author | bors <bors@rust-lang.org> | 2024-04-15 16:46:59 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-15 16:46:59 +0000 |
| commit | 99d0186b1d0547eae913eff04be272c9d348b9b8 (patch) | |
| tree | 2048699106c48707603dd1bc9b25a1e38cf11071 /compiler/rustc_data_structures/src/graph/reference.rs | |
| parent | 023084804e5e8ea42877451c2b3030e7050281cc (diff) | |
| parent | 723c0e23bcc43baa2f7ad6f6ef60f96b3cf169eb (diff) | |
| download | rust-99d0186b1d0547eae913eff04be272c9d348b9b8.tar.gz rust-99d0186b1d0547eae913eff04be272c9d348b9b8.zip | |
Auto merge of #123968 - jieyouxu:rollup-1pnkxor, r=jieyouxu
Rollup of 12 pull requests Successful merges: - #123423 (Distribute LLVM bitcode linker as a preview component) - #123548 (libtest: also measure time in Miri) - #123666 (Fix some typos in doc) - #123864 (Remove a HACK by instead inferring opaque types during expected/formal type checking) - #123896 (Migrate some diagnostics in `rustc_resolve` to session diagnostic) - #123919 (builtin-derive: tag → discriminant) - #123922 (Remove magic constants when using `base_n`.) - #123931 (Don't leak unnameable types in `-> _` recover) - #123933 (move the LargeAssignments lint logic into its own file) - #123934 (`rustc_data_structures::graph` mini refactor) - #123941 (Fix UB in LLVM FFI when passing zero or >1 bundle) - #123957 (disable create_dir_all_bare test on all(miri, windows)) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_data_structures/src/graph/reference.rs')
| -rw-r--r-- | compiler/rustc_data_structures/src/graph/reference.rs | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/compiler/rustc_data_structures/src/graph/reference.rs b/compiler/rustc_data_structures/src/graph/reference.rs index c259fe56c15..7a487552f53 100644 --- a/compiler/rustc_data_structures/src/graph/reference.rs +++ b/compiler/rustc_data_structures/src/graph/reference.rs @@ -2,38 +2,26 @@ use super::*; impl<'graph, G: DirectedGraph> DirectedGraph for &'graph G { type Node = G::Node; -} -impl<'graph, G: WithNumNodes> WithNumNodes for &'graph G { fn num_nodes(&self) -> usize { (**self).num_nodes() } } -impl<'graph, G: WithStartNode> WithStartNode for &'graph G { +impl<'graph, G: StartNode> StartNode for &'graph G { fn start_node(&self) -> Self::Node { (**self).start_node() } } -impl<'graph, G: WithSuccessors> WithSuccessors for &'graph G { - fn successors(&self, node: Self::Node) -> <Self as GraphSuccessors<'_>>::Iter { +impl<'graph, G: Successors> Successors for &'graph G { + fn successors(&self, node: Self::Node) -> impl Iterator<Item = Self::Node> { (**self).successors(node) } } -impl<'graph, G: WithPredecessors> WithPredecessors for &'graph G { - fn predecessors(&self, node: Self::Node) -> <Self as GraphPredecessors<'_>>::Iter { +impl<'graph, G: Predecessors> Predecessors for &'graph G { + fn predecessors(&self, node: Self::Node) -> impl Iterator<Item = Self::Node> { (**self).predecessors(node) } } - -impl<'iter, 'graph, G: WithPredecessors> GraphPredecessors<'iter> for &'graph G { - type Item = G::Node; - type Iter = <G as GraphPredecessors<'iter>>::Iter; -} - -impl<'iter, 'graph, G: WithSuccessors> GraphSuccessors<'iter> for &'graph G { - type Item = G::Node; - type Iter = <G as GraphSuccessors<'iter>>::Iter; -} |
