]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/dataflow/impls/mod.rs
Export dataflow impls by name
[rust.git] / src / librustc_mir / dataflow / impls / mod.rs
index 3ffa771cb05a14333d97546272843b9af83945d2..e199a174efbc30d6f220dc65e9e1b3c83adb64b3 100644 (file)
@@ -5,8 +5,8 @@
 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
@@ -323,7 +325,7 @@ fn call_return_effect(
         _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).
@@ -342,7 +344,7 @@ fn discriminant_switch_effect(
         &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,
     ) {
@@ -425,7 +427,7 @@ fn call_return_effect(
         _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).
@@ -494,7 +496,7 @@ fn call_return_effect(
         _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).
@@ -585,7 +587,7 @@ fn call_return_effect(
         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;