Skip to content

Commit dc8de74

Browse files
committed
Update my code to use the new interface
1 parent 7bc220b commit dc8de74

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

compiler/rustc_borrowck/src/eliminate_placeholders.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use rustc_span::Span;
2020
use tracing::{debug, instrument, trace};
2121

2222
use crate::ConstraintCategory;
23-
use crate::constraints::graph::{ConstraintGraph, Normal};
23+
use crate::constraints::graph::{ConstraintGraph, Normal, RegionGraph};
2424
use crate::constraints::{ConstraintSccIndex, OutlivesConstraintSet};
2525
use crate::consumers::OutlivesConstraint;
2626
use crate::diagnostics::{RegionErrorKind, RegionErrors};
@@ -556,6 +556,8 @@ fn find_region<'tcx>(
556556
Visited,
557557
}
558558

559+
let graph = RegionGraph::new(constraints, graph, fr_static);
560+
559561
let mut context = IndexVec::from_elem(Trace::NotVisited, definitions);
560562
context[start_region] = Trace::StartRegion;
561563

@@ -567,11 +569,7 @@ fn find_region<'tcx>(
567569
return r;
568570
}
569571

570-
let outgoing_edges_from_graph = graph.outgoing_edges(r, constraints, Some(fr_static));
571-
572-
for constraint in outgoing_edges_from_graph {
573-
debug_assert_eq!(constraint.sup, r);
574-
let sub_region = constraint.sub;
572+
for sub_region in graph.outgoing_regions(r) {
575573
if let Trace::NotVisited = context[sub_region] {
576574
context[sub_region] = Trace::Visited;
577575
deque.push_back(sub_region);

0 commit comments

Comments
 (0)