rustc_mir_dataflow/framework/
results.rs1use rustc_index::IndexVec;
4use rustc_middle::mir::{BasicBlock, Body};
5
6use super::{Analysis, ResultsCursor};
7
8pub type EntryStates<D> = IndexVec<BasicBlock, D>;
9
10pub struct Results<'tcx, A>
15where
16 A: Analysis<'tcx>,
17{
18 pub analysis: A,
19 pub entry_states: EntryStates<A::Domain>,
20}
21
22impl<'tcx, A> Results<'tcx, A>
23where
24 A: Analysis<'tcx>,
25{
26 pub fn into_results_cursor<'mir>(self, body: &'mir Body<'tcx>) -> ResultsCursor<'mir, 'tcx, A> {
28 ResultsCursor::new_owning(body, self)
29 }
30}