Skip to content

Commit 34aa36b

Browse files
committed
Remove ResultsCloned and ResultsClonedCursor.
They're now unused.
1 parent 500e55b commit 34aa36b

File tree

3 files changed

+4
-26
lines changed

3 files changed

+4
-26
lines changed

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

+1-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::cmp::Ordering;
99
use rustc_index::bit_set::BitSet;
1010
use rustc_middle::mir::{self, BasicBlock, Location};
1111

12-
use super::{Analysis, Direction, Effect, EffectIndex, EntrySets, Results, ResultsCloned};
12+
use super::{Analysis, Direction, Effect, EffectIndex, EntrySets, Results};
1313

1414
// `AnalysisResults` is needed as an impl such as the following has an unconstrained type
1515
// parameter:
@@ -40,11 +40,6 @@ where
4040
type EntrySets = E;
4141
}
4242

43-
/// A `ResultsCursor` which uses a cloned `Analysis` while borrowing the underlying `Results`. This
44-
/// allows multiple cursors over the same `Results`.
45-
pub type ResultsClonedCursor<'res, 'mir, 'tcx, A> =
46-
ResultsCursor<'mir, 'tcx, A, ResultsCloned<'res, 'tcx, A>>;
47-
4843
/// Allows random access inspection of the results of a dataflow analysis.
4944
///
5045
/// This cursor only has linear performance within a basic block when its statements are visited in

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

+1-18
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, ResultsVisitor,
28+
JoinSemiLattice, ResultsCursor, ResultsVisitor,
2929
};
3030

3131
pub type EntrySets<'tcx, A> = IndexVec<BasicBlock, <A as AnalysisDomain<'tcx>>::Domain>;
@@ -41,9 +41,6 @@ where
4141
pub(super) _marker: PhantomData<&'tcx ()>,
4242
}
4343

44-
/// `Results` type with a cloned `Analysis` and borrowed entry sets.
45-
pub type ResultsCloned<'res, 'tcx, A> = Results<'tcx, A, &'res EntrySets<'tcx, A>>;
46-
4744
impl<'tcx, A, E> Results<'tcx, A, E>
4845
where
4946
A: Analysis<'tcx>,
@@ -81,20 +78,6 @@ where
8178
}
8279
}
8380

84-
impl<'tcx, A> Results<'tcx, A>
85-
where
86-
A: Analysis<'tcx> + Copy,
87-
{
88-
/// Creates a `ResultsCursor` that can inspect these `Results`.
89-
pub fn cloned_results_cursor<'mir>(
90-
&self,
91-
body: &'mir mir::Body<'tcx>,
92-
) -> ResultsClonedCursor<'_, 'mir, 'tcx, A> {
93-
Results { analysis: self.analysis, entry_sets: &self.entry_sets, _marker: PhantomData }
94-
.into_results_cursor(body)
95-
}
96-
}
97-
9881
/// A solver for dataflow problems.
9982
pub struct Engine<'mir, 'tcx, A>
10083
where

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

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

48-
pub use self::cursor::{ResultsClonedCursor, ResultsCursor};
48+
pub use self::cursor::ResultsCursor;
4949
pub use self::direction::{Backward, Direction, Forward};
50-
pub use self::engine::{Engine, EntrySets, Results, ResultsCloned};
50+
pub use self::engine::{Engine, EntrySets, Results};
5151
pub use self::lattice::{JoinSemiLattice, MaybeReachable};
5252
pub use self::visitor::{visit_results, ResultsVisitable, ResultsVisitor};
5353

0 commit comments

Comments
 (0)