Refer to a couple of domains indirectly.

Via the `Analysis::Domain` associated types, instead of the direct type
name.
This commit is contained in:
Nicholas Nethercote 2024-11-26 14:17:12 +11:00
parent d490ea1f39
commit 086233e282
2 changed files with 2 additions and 3 deletions

View file

@ -70,7 +70,7 @@ impl<'a, 'tcx> MaybeInitializedPlaces<'a, 'tcx> {
pub fn is_unwind_dead(
&self,
place: mir::Place<'tcx>,
state: &MaybeReachable<MixedBitSet<MovePathIndex>>,
state: &<Self as Analysis<'tcx>>::Domain,
) -> bool {
if let LookupResult::Exact(path) = self.move_data().rev_lookup.find(place.as_ref()) {
let mut maybe_live = false;

View file

@ -1,6 +1,5 @@
use rustc_ast::MetaItem;
use rustc_hir::def_id::DefId;
use rustc_index::bit_set::BitSet;
use rustc_middle::mir::{self, Body, Local, Location};
use rustc_middle::ty::{self, Ty, TyCtxt};
use rustc_span::Span;
@ -254,7 +253,7 @@ impl<'tcx> RustcPeekAt<'tcx> for MaybeLiveLocals {
&self,
tcx: TyCtxt<'tcx>,
place: mir::Place<'tcx>,
state: &BitSet<Local>,
state: &Self::Domain,
call: PeekCall,
) {
info!(?place, "peek_at");