1
Fork 0

Move domain_size to GenKillAnalysis.

This commit is contained in:
Camille GILLOT 2023-05-06 22:00:24 +00:00
parent 8726cbc75f
commit 934a99eb65
8 changed files with 43 additions and 14 deletions

View file

@ -334,6 +334,10 @@ impl<'tcx> rustc_mir_dataflow::AnalysisDomain<'tcx> for Borrows<'_, 'tcx> {
impl<'tcx> rustc_mir_dataflow::GenKillAnalysis<'tcx> for Borrows<'_, 'tcx> {
type Idx = BorrowIndex;
fn domain_size(&self, _: &mir::Body<'tcx>) -> usize {
self.borrow_set.len()
}
fn before_statement_effect(
&mut self,
trans: &mut impl GenKill<Self::Idx>,