diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2016-05-20 13:20:00 +0200 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2016-05-20 13:20:00 +0200 |
| commit | 011c37d59e51ba6553b9146aeb32a9a4cf5a179d (patch) | |
| tree | 12d78e3d7a514269b26cd3601cbdc31847252d2b | |
| parent | 9fcbe2a2f902d6a538a3605877e0eb1b3ad9314f (diff) | |
| download | rust-011c37d59e51ba6553b9146aeb32a9a4cf5a179d.tar.gz rust-011c37d59e51ba6553b9146aeb32a9a4cf5a179d.zip | |
`borrowck::mir`: alpha-renamed DropFlagState variant names.
| -rw-r--r-- | src/librustc_borrowck/borrowck/mir/dataflow/mod.rs | 18 | ||||
| -rw-r--r-- | src/librustc_borrowck/borrowck/mir/mod.rs | 10 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/librustc_borrowck/borrowck/mir/dataflow/mod.rs b/src/librustc_borrowck/borrowck/mir/dataflow/mod.rs index 9f0186a36a8..cb110e606f2 100644 --- a/src/librustc_borrowck/borrowck/mir/dataflow/mod.rs +++ b/src/librustc_borrowck/borrowck/mir/dataflow/mod.rs @@ -827,11 +827,11 @@ impl<'a, 'tcx> MaybeInitializedLvals<'a, 'tcx> { state: super::DropFlagState) { match state { - DropFlagState::Dead => { + DropFlagState::Absent => { sets.gen_set.clear_bit(path.idx()); sets.kill_set.set_bit(path.idx()); } - DropFlagState::Live => { + DropFlagState::Present => { sets.gen_set.set_bit(path.idx()); sets.kill_set.clear_bit(path.idx()); } @@ -844,11 +844,11 @@ impl<'a, 'tcx> MaybeUninitializedLvals<'a, 'tcx> { state: super::DropFlagState) { match state { - DropFlagState::Dead => { + DropFlagState::Absent => { sets.gen_set.set_bit(path.idx()); sets.kill_set.clear_bit(path.idx()); } - DropFlagState::Live => { + DropFlagState::Present => { sets.gen_set.clear_bit(path.idx()); sets.kill_set.set_bit(path.idx()); } @@ -861,11 +861,11 @@ impl<'a, 'tcx> DefinitelyInitializedLvals<'a, 'tcx> { state: super::DropFlagState) { match state { - DropFlagState::Dead => { + DropFlagState::Absent => { sets.gen_set.clear_bit(path.idx()); sets.kill_set.set_bit(path.idx()); } - DropFlagState::Live => { + DropFlagState::Present => { sets.gen_set.set_bit(path.idx()); sets.kill_set.clear_bit(path.idx()); } @@ -889,7 +889,7 @@ impl<'a, 'tcx> BitDenotation for MaybeInitializedLvals<'a, 'tcx> { super::drop_flag_effects_for_function_entry( ctxt.0, ctxt.1, &ctxt.2, |path, s| { - assert!(s == DropFlagState::Live); + assert!(s == DropFlagState::Present); sets.on_entry.set_bit(path.idx()); }); } @@ -956,7 +956,7 @@ impl<'a, 'tcx> BitDenotation for MaybeUninitializedLvals<'a, 'tcx> { super::drop_flag_effects_for_function_entry( ctxt.0, ctxt.1, &ctxt.2, |path, s| { - assert!(s == DropFlagState::Live); + assert!(s == DropFlagState::Present); sets.on_entry.clear_bit(path.idx()); }); } @@ -1022,7 +1022,7 @@ impl<'a, 'tcx> BitDenotation for DefinitelyInitializedLvals<'a, 'tcx> { super::drop_flag_effects_for_function_entry( ctxt.0, ctxt.1, &ctxt.2, |path, s| { - assert!(s == DropFlagState::Live); + assert!(s == DropFlagState::Present); sets.on_entry.set_bit(path.idx()); }); } diff --git a/src/librustc_borrowck/borrowck/mir/mod.rs b/src/librustc_borrowck/borrowck/mir/mod.rs index 405647aec02..a3cf6176779 100644 --- a/src/librustc_borrowck/borrowck/mir/mod.rs +++ b/src/librustc_borrowck/borrowck/mir/mod.rs @@ -195,8 +195,8 @@ impl<'b, 'a: 'b, 'tcx: 'a> MirBorrowckCtxt<'b, 'a, 'tcx> { #[derive(Debug, PartialEq, Eq, Copy, Clone)] enum DropFlagState { - Live, - Dead + Present, // i.e. initialized + Absent, // i.e. deinitialized or "moved" } fn on_all_children_bits<'a, 'tcx, F>( @@ -266,7 +266,7 @@ fn drop_flag_effects_for_function_entry<'a, 'tcx, F>( let move_path_index = move_data.rev_lookup.find(&lvalue); on_all_children_bits(tcx, mir, move_data, move_path_index, - |moi| callback(moi, DropFlagState::Live)); + |moi| callback(moi, DropFlagState::Present)); } } @@ -296,7 +296,7 @@ fn drop_flag_effects_for_location<'a, 'tcx, F>( on_all_children_bits(tcx, mir, move_data, path, - |moi| callback(moi, DropFlagState::Dead)) + |moi| callback(moi, DropFlagState::Absent)) } let bb = mir.basic_block_data(loc.block); @@ -306,7 +306,7 @@ fn drop_flag_effects_for_location<'a, 'tcx, F>( debug!("drop_flag_effects: assignment {:?}", stmt); on_all_children_bits(tcx, mir, move_data, move_data.rev_lookup.find(lvalue), - |moi| callback(moi, DropFlagState::Live)) + |moi| callback(moi, DropFlagState::Present)) } }, None => { |
