Skip to content

Commit

Permalink
Make the lifetime accurate which is used in the region constraints part
Browse files Browse the repository at this point in the history
  • Loading branch information
SparrowLii committed Apr 22, 2022
1 parent 5176945 commit 343523c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions compiler/rustc_borrowck/src/constraints/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ impl<'s, 'tcx, D: ConstraintGraphDirecton> RegionGraph<'s, 'tcx, D> {

/// Given a region `R`, iterate over all regions `R1` such that
/// there exists a constraint `R: R1`.
crate fn outgoing_regions(&self, region_sup: RegionVid) -> Successors<'_, 'tcx, D> {
crate fn outgoing_regions(&self, region_sup: RegionVid) -> Successors<'s, 'tcx, D> {
Successors {
edges: self.constraint_graph.outgoing_edges(region_sup, self.set, self.static_region),
}
Expand Down Expand Up @@ -225,10 +225,7 @@ impl<'s, 'tcx, D: ConstraintGraphDirecton> graph::WithSuccessors for RegionGraph
}
}

impl<'s, 'graph, 'tcx, D: ConstraintGraphDirecton> graph::GraphSuccessors<'graph>
for RegionGraph<'s, 'tcx, D>
{
impl<'s, 'tcx, D: ConstraintGraphDirecton> graph::GraphSuccessors<'_> for RegionGraph<'s, 'tcx, D> {
type Item = RegionVid;
// FIXME - why can't this be `'graph, 'tcx`
type Iter = Successors<'graph, 'graph, D>;
type Iter = Successors<'s, 'tcx, D>;
}

0 comments on commit 343523c

Please sign in to comment.