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:
Nicholas Nethercote
2023-11-24 11:28:21 +11:00
parent 34aa36b266
commit e966c89417
5 changed files with 27 additions and 72 deletions

View File

@@ -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;