use rustc_index::bit_set::BitSet;
use rustc_index::vec::Idx;
use rustc_middle::mir::{self, Body, Location};
-use rustc_middle::ty::layout::VariantIdx;
use rustc_middle::ty::{self, TyCtxt};
+use rustc_target::abi::VariantIdx;
use super::MoveDataParamEnv;
use crate::dataflow::drop_flag_effects;
mod borrowed_locals;
+pub(super) mod borrows;
+mod liveness;
mod storage_liveness;
-pub use self::borrowed_locals::*;
-pub use self::storage_liveness::*;
-
-pub(super) mod borrows;
+pub use self::borrowed_locals::{MaybeBorrowedLocals, MaybeMutBorrowedLocals};
+pub use self::borrows::Borrows;
+pub use self::liveness::MaybeLiveLocals;
+pub use self::storage_liveness::{MaybeRequiresStorage, MaybeStorageLive};
/// `MaybeInitializedPlaces` tracks all places that might be
/// initialized upon reaching a particular point in the control flow
_block: mir::BasicBlock,
_func: &mir::Operand<'tcx>,
_args: &[mir::Operand<'tcx>],
- dest_place: &mir::Place<'tcx>,
+ dest_place: mir::Place<'tcx>,
) {
// when a call returns successfully, that means we need to set
// the bits for that dest_place to 1 (initialized).
&self,
trans: &mut impl GenKill<Self::Idx>,
_block: mir::BasicBlock,
- enum_place: &mir::Place<'tcx>,
+ enum_place: mir::Place<'tcx>,
_adt: &ty::AdtDef,
variant: VariantIdx,
) {
_block: mir::BasicBlock,
_func: &mir::Operand<'tcx>,
_args: &[mir::Operand<'tcx>],
- dest_place: &mir::Place<'tcx>,
+ dest_place: mir::Place<'tcx>,
) {
// when a call returns successfully, that means we need to set
// the bits for that dest_place to 0 (initialized).
_block: mir::BasicBlock,
_func: &mir::Operand<'tcx>,
_args: &[mir::Operand<'tcx>],
- dest_place: &mir::Place<'tcx>,
+ dest_place: mir::Place<'tcx>,
) {
// when a call returns successfully, that means we need to set
// the bits for that dest_place to 1 (initialized).
block: mir::BasicBlock,
_func: &mir::Operand<'tcx>,
_args: &[mir::Operand<'tcx>],
- _dest_place: &mir::Place<'tcx>,
+ _dest_place: mir::Place<'tcx>,
) {
let move_data = self.move_data();
let init_loc_map = &move_data.init_loc_map;