Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 99d0186

Browse files
committedApr 15, 2024
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
2 parents 0230848 + 723c0e2 commit 99d0186

File tree

53 files changed

+1318
-795
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1318
-795
lines changed
 

‎compiler/rustc_borrowck/src/constraints/graph.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -216,23 +216,14 @@ impl<'s, 'tcx, D: ConstraintGraphDirection> Iterator for Successors<'s, 'tcx, D>
216216

217217
impl<'s, 'tcx, D: ConstraintGraphDirection> graph::DirectedGraph for RegionGraph<'s, 'tcx, D> {
218218
type Node = RegionVid;
219-
}
220219

221-
impl<'s, 'tcx, D: ConstraintGraphDirection> graph::WithNumNodes for RegionGraph<'s, 'tcx, D> {
222220
fn num_nodes(&self) -> usize {
223221
self.constraint_graph.first_constraints.len()
224222
}
225223
}
226224

227-
impl<'s, 'tcx, D: ConstraintGraphDirection> graph::WithSuccessors for RegionGraph<'s, 'tcx, D> {
228-
fn successors(&self, node: Self::Node) -> <Self as graph::GraphSuccessors<'_>>::Iter {
225+
impl<'s, 'tcx, D: ConstraintGraphDirection> graph::Successors for RegionGraph<'s, 'tcx, D> {
226+
fn successors(&self, node: Self::Node) -> impl Iterator<Item = Self::Node> {
229227
self.outgoing_regions(node)
230228
}
231229
}
232-
233-
impl<'s, 'tcx, D: ConstraintGraphDirection> graph::GraphSuccessors<'_>
234-
for RegionGraph<'s, 'tcx, D>
235-
{
236-
type Item = RegionVid;
237-
type Iter = Successors<'s, 'tcx, D>;
238-
}

‎compiler/rustc_borrowck/src/dataflow.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use rustc_data_structures::fx::FxIndexMap;
2-
use rustc_data_structures::graph::WithSuccessors;
2+
use rustc_data_structures::graph;
33
use rustc_index::bit_set::BitSet;
44
use rustc_middle::mir::{
55
self, BasicBlock, Body, CallReturnPlaces, Location, Place, TerminatorEdges,
@@ -262,7 +262,7 @@ impl<'tcx> PoloniusOutOfScopePrecomputer<'_, 'tcx> {
262262

263263
// We first handle the cases where the loan doesn't go out of scope, depending on the issuing
264264
// region's successors.
265-
for successor in self.regioncx.region_graph().depth_first_search(issuing_region) {
265+
for successor in graph::depth_first_search(&self.regioncx.region_graph(), issuing_region) {
266266
// 1. Via applied member constraints
267267
//
268268
// The issuing region can flow into the choice regions, and they are either:

0 commit comments

Comments
 (0)
Please sign in to comment.