Remove ResultsRefCursor
.
It's no longer used.
This commit is contained in:
parent
cf82b410f9
commit
5f5263bfc8
3 changed files with 2 additions and 29 deletions
|
@ -39,17 +39,6 @@ where
|
|||
{
|
||||
type EntrySets = E;
|
||||
}
|
||||
impl<'a, 'tcx, A, E> AnalysisResults<'tcx, A> for &'a mut Results<'tcx, A, E>
|
||||
where
|
||||
A: Analysis<'tcx>,
|
||||
E: Borrow<EntrySets<'tcx, A>>,
|
||||
{
|
||||
type EntrySets = E;
|
||||
}
|
||||
|
||||
/// A `ResultsCursor` that borrows the underlying `Results`.
|
||||
pub type ResultsRefCursor<'res, 'mir, 'tcx, A> =
|
||||
ResultsCursor<'mir, 'tcx, A, &'res mut Results<'tcx, A>>;
|
||||
|
||||
/// A `ResultsCursor` which uses a cloned `Analysis` while borrowing the underlying `Results`. This
|
||||
/// allows multiple cursors over the same `Results`.
|
||||
|
@ -62,9 +51,6 @@ pub type ResultsClonedCursor<'res, 'mir, 'tcx, A> =
|
|||
/// the same order as the `DIRECTION` of the analysis. In the worst case—when statements are
|
||||
/// visited in *reverse* order—performance will be quadratic in the number of statements in the
|
||||
/// block. The order in which basic blocks are inspected has no impact on performance.
|
||||
///
|
||||
/// A `ResultsCursor` can either own (the default) or borrow the dataflow results it inspects. The
|
||||
/// type of ownership is determined by `R` (see `ResultsRefCursor` above).
|
||||
pub struct ResultsCursor<'mir, 'tcx, A, R = Results<'tcx, A>>
|
||||
where
|
||||
A: Analysis<'tcx>,
|
||||
|
|
|
@ -25,7 +25,7 @@ use super::fmt::DebugWithContext;
|
|||
use super::graphviz;
|
||||
use super::{
|
||||
visit_results, Analysis, AnalysisDomain, Direction, GenKill, GenKillAnalysis, GenKillSet,
|
||||
JoinSemiLattice, ResultsClonedCursor, ResultsCursor, ResultsRefCursor, ResultsVisitor,
|
||||
JoinSemiLattice, ResultsClonedCursor, ResultsCursor, ResultsVisitor,
|
||||
};
|
||||
|
||||
pub type EntrySets<'tcx, A> = IndexVec<BasicBlock, <A as AnalysisDomain<'tcx>>::Domain>;
|
||||
|
@ -80,19 +80,6 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
impl<'tcx, A> Results<'tcx, A>
|
||||
where
|
||||
A: Analysis<'tcx>,
|
||||
{
|
||||
/// Creates a `ResultsCursor` that can inspect these `Results`.
|
||||
pub fn as_results_cursor<'a, 'mir>(
|
||||
&'a mut self,
|
||||
body: &'mir mir::Body<'tcx>,
|
||||
) -> ResultsRefCursor<'a, 'mir, 'tcx, A> {
|
||||
ResultsCursor::new(body, self)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'tcx, A> Results<'tcx, A>
|
||||
where
|
||||
A: Analysis<'tcx> + Copy,
|
||||
|
|
|
@ -45,7 +45,7 @@ pub mod graphviz;
|
|||
pub mod lattice;
|
||||
mod visitor;
|
||||
|
||||
pub use self::cursor::{ResultsClonedCursor, ResultsCursor, ResultsRefCursor};
|
||||
pub use self::cursor::{ResultsClonedCursor, ResultsCursor};
|
||||
pub use self::direction::{Backward, Direction, Forward};
|
||||
pub use self::engine::{Engine, EntrySets, Results, ResultsCloned};
|
||||
pub use self::lattice::{JoinSemiLattice, MaybeReachable};
|
||||
|
|
Loading…
Add table
Reference in a new issue