Skip to content

Commit 5f5263b

Browse files
committed
Remove ResultsRefCursor.
It's no longer used.
1 parent cf82b41 commit 5f5263b

File tree

3 files changed

+2
-29
lines changed

3 files changed

+2
-29
lines changed

Diff for: compiler/rustc_mir_dataflow/src/framework/cursor.rs

-14
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,6 @@ where
3939
{
4040
type EntrySets = E;
4141
}
42-
impl<'a, 'tcx, A, E> AnalysisResults<'tcx, A> for &'a mut Results<'tcx, A, E>
43-
where
44-
A: Analysis<'tcx>,
45-
E: Borrow<EntrySets<'tcx, A>>,
46-
{
47-
type EntrySets = E;
48-
}
49-
50-
/// A `ResultsCursor` that borrows the underlying `Results`.
51-
pub type ResultsRefCursor<'res, 'mir, 'tcx, A> =
52-
ResultsCursor<'mir, 'tcx, A, &'res mut Results<'tcx, A>>;
5342

5443
/// A `ResultsCursor` which uses a cloned `Analysis` while borrowing the underlying `Results`. This
5544
/// allows multiple cursors over the same `Results`.
@@ -62,9 +51,6 @@ pub type ResultsClonedCursor<'res, 'mir, 'tcx, A> =
6251
/// the same order as the `DIRECTION` of the analysis. In the worst case—when statements are
6352
/// visited in *reverse* order—performance will be quadratic in the number of statements in the
6453
/// block. The order in which basic blocks are inspected has no impact on performance.
65-
///
66-
/// A `ResultsCursor` can either own (the default) or borrow the dataflow results it inspects. The
67-
/// type of ownership is determined by `R` (see `ResultsRefCursor` above).
6854
pub struct ResultsCursor<'mir, 'tcx, A, R = Results<'tcx, A>>
6955
where
7056
A: Analysis<'tcx>,

Diff for: compiler/rustc_mir_dataflow/src/framework/engine.rs

+1-14
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use super::fmt::DebugWithContext;
2525
use super::graphviz;
2626
use super::{
2727
visit_results, Analysis, AnalysisDomain, Direction, GenKill, GenKillAnalysis, GenKillSet,
28-
JoinSemiLattice, ResultsClonedCursor, ResultsCursor, ResultsRefCursor, ResultsVisitor,
28+
JoinSemiLattice, ResultsClonedCursor, ResultsCursor, ResultsVisitor,
2929
};
3030

3131
pub type EntrySets<'tcx, A> = IndexVec<BasicBlock, <A as AnalysisDomain<'tcx>>::Domain>;
@@ -80,19 +80,6 @@ where
8080
}
8181
}
8282

83-
impl<'tcx, A> Results<'tcx, A>
84-
where
85-
A: Analysis<'tcx>,
86-
{
87-
/// Creates a `ResultsCursor` that can inspect these `Results`.
88-
pub fn as_results_cursor<'a, 'mir>(
89-
&'a mut self,
90-
body: &'mir mir::Body<'tcx>,
91-
) -> ResultsRefCursor<'a, 'mir, 'tcx, A> {
92-
ResultsCursor::new(body, self)
93-
}
94-
}
95-
9683
impl<'tcx, A> Results<'tcx, A>
9784
where
9885
A: Analysis<'tcx> + Copy,

Diff for: compiler/rustc_mir_dataflow/src/framework/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub mod graphviz;
4545
pub mod lattice;
4646
mod visitor;
4747

48-
pub use self::cursor::{ResultsClonedCursor, ResultsCursor, ResultsRefCursor};
48+
pub use self::cursor::{ResultsClonedCursor, ResultsCursor};
4949
pub use self::direction::{Backward, Direction, Forward};
5050
pub use self::engine::{Engine, EntrySets, Results, ResultsCloned};
5151
pub use self::lattice::{JoinSemiLattice, MaybeReachable};

0 commit comments

Comments
 (0)