Deparameterize Results and ResultsCursor.
They both now only ever contain a `Results<'tcx, A>`. This means `AnalysisResults` can be removed, as can many `borrow`/`borrow_mut` calls. Also `Results` no longer needs a `PhantomData` because `'tcx` is now named by `entry_sets`.
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
use std::borrow::Borrow;
|
||||
|
||||
use rustc_middle::mir::{self, BasicBlock, Location};
|
||||
|
||||
use super::{Analysis, Direction, EntrySets, Results};
|
||||
use super::{Analysis, Direction, Results};
|
||||
|
||||
/// Calls the corresponding method in `ResultsVisitor` for every location in a `mir::Body` with the
|
||||
/// dataflow state at that location.
|
||||
@@ -143,10 +141,9 @@ pub trait ResultsVisitable<'tcx> {
|
||||
);
|
||||
}
|
||||
|
||||
impl<'tcx, A, E> ResultsVisitable<'tcx> for Results<'tcx, A, E>
|
||||
impl<'tcx, A> ResultsVisitable<'tcx> for Results<'tcx, A>
|
||||
where
|
||||
A: Analysis<'tcx>,
|
||||
E: Borrow<EntrySets<'tcx, A>>,
|
||||
{
|
||||
type FlowState = A::Domain;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user