1
Fork 0

Tweak GenKillAnalysis method arguments.

`GenKillAnalysis` has very similar methods to `Analysis`, but the first
two have a notable difference: the second argument is `&mut impl
GenKill<Self::Idx>` instead of `&mut Self::Domain`. But thanks to the
previous commit, this difference is no longer necessary.
This commit is contained in:
Nicholas Nethercote 2024-10-10 06:46:08 +11:00
parent e0b83c34c3
commit 13968b4a70
6 changed files with 16 additions and 32 deletions

View file

@ -260,19 +260,18 @@ pub trait GenKillAnalysis<'tcx>: Analysis<'tcx> {
fn domain_size(&self, body: &mir::Body<'tcx>) -> usize;
/// See `Analysis::apply_statement_effect`. Note how the second arg differs.
/// See `Analysis::apply_statement_effect`.
fn statement_effect(
&mut self,
trans: &mut impl GenKill<Self::Idx>,
trans: &mut Self::Domain,
statement: &mir::Statement<'tcx>,
location: Location,
);
/// See `Analysis::apply_before_statement_effect`. Note how the second arg
/// differs.
/// See `Analysis::apply_before_statement_effect`.
fn before_statement_effect(
&mut self,
_trans: &mut impl GenKill<Self::Idx>,
_trans: &mut Self::Domain,
_statement: &mir::Statement<'tcx>,
_location: Location,
) {