Minimize use of GenKill.

Thanks to the previous couple of commits, many uses of the `GenKill`
trait can be replaced with a concrete type.
This commit is contained in:
Nicholas Nethercote 2024-10-10 10:14:58 +11:00
parent 13968b4a70
commit 525f655866
5 changed files with 33 additions and 34 deletions

View file

@ -427,7 +427,7 @@ impl<'a, 'tcx> Borrows<'a, 'tcx> {
/// That means they went out of a nonlexical scope
fn kill_loans_out_of_scope_at_location(
&self,
trans: &mut impl GenKill<BorrowIndex>,
trans: &mut <Self as AnalysisDomain<'tcx>>::Domain,
location: Location,
) {
// NOTE: The state associated with a given `location`
@ -447,7 +447,11 @@ impl<'a, 'tcx> Borrows<'a, 'tcx> {
}
/// Kill any borrows that conflict with `place`.
fn kill_borrows_on_place(&self, trans: &mut impl GenKill<BorrowIndex>, place: Place<'tcx>) {
fn kill_borrows_on_place(
&self,
trans: &mut <Self as AnalysisDomain<'tcx>>::Domain,
place: Place<'tcx>,
) {
debug!("kill_borrows_on_place: place={:?}", place);
let other_borrows_of_local = self