Struct rustc_mir::dataflow::impls::MovingOutStatements [−][src]
pub struct MovingOutStatements<'a, 'gcx: 'tcx, 'tcx: 'a> { tcx: TyCtxt<'a, 'gcx, 'tcx>, mir: &'a Mir<'tcx>, mdpe: &'a MoveDataParamEnv<'gcx, 'tcx>, }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
MovingOutStatements
tracks the statements that perform moves out
of particular places. More precisely, it tracks whether the
effect of such moves (namely, the uninitialization of the
place in question) can reach some point in the control-flow of
the function, or if that effect is "killed" by some intervening
operation reinitializing that place.
The resulting dataflow is a more enriched version of
MaybeUninitializedPlaces
. Both structures on their own only tell
you if a place might be uninitialized at a given point in the
control flow. But MovingOutStatements
also includes the added
data of which particular statement causing the deinitialization
that the borrow checker's error message may need to report.
Fields
tcx: TyCtxt<'a, 'gcx, 'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
mir: &'a Mir<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
mdpe: &'a MoveDataParamEnv<'gcx, 'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Methods
impl<'a, 'gcx: 'tcx, 'tcx: 'a> MovingOutStatements<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx: 'tcx, 'tcx: 'a> MovingOutStatements<'a, 'gcx, 'tcx>
pub fn new(
tcx: TyCtxt<'a, 'gcx, 'tcx>,
mir: &'a Mir<'tcx>,
mdpe: &'a MoveDataParamEnv<'gcx, 'tcx>
) -> Self
[src]
pub fn new(
tcx: TyCtxt<'a, 'gcx, 'tcx>,
mir: &'a Mir<'tcx>,
mdpe: &'a MoveDataParamEnv<'gcx, 'tcx>
) -> Self
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Trait Implementations
impl<'a, 'gcx, 'tcx> HasMoveData<'tcx> for MovingOutStatements<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> HasMoveData<'tcx> for MovingOutStatements<'a, 'gcx, 'tcx>
fn move_data(&self) -> &MoveData<'tcx>
[src]
fn move_data(&self) -> &MoveData<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, 'gcx, 'tcx> BitDenotation for MovingOutStatements<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> BitDenotation for MovingOutStatements<'a, 'gcx, 'tcx>
type Idx = MoveOutIndex
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Specifies what index type is used to access the bitvector.
fn name() -> &'static str
[src]
fn name() -> &'static str
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
A name describing the dataflow analysis that this BitDenotation is supporting. The name should be something suitable for plugging in as part of a filename e.g. avoid space-characters or other things that tend to look bad on a file system, like slashes or periods. It is also better for the name to be reasonably short, again because it will be plugged into a filename. Read more
fn bits_per_block(&self) -> usize
[src]
fn bits_per_block(&self) -> usize
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Size of each bitvector allocated for each block in the analysis.
fn start_block_effect(&self, _sets: &mut IdxSet<MoveOutIndex>)
[src]
fn start_block_effect(&self, _sets: &mut IdxSet<MoveOutIndex>)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Mutates the entry set according to the effects that have been established prior to entering the start block. This can't access the gen/kill sets, because these won't be accounted for correctly. Read more
fn statement_effect(
&self,
sets: &mut BlockSets<MoveOutIndex>,
location: Location
)
[src]
fn statement_effect(
&self,
sets: &mut BlockSets<MoveOutIndex>,
location: Location
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Mutates the block-sets (the flow sets for the given basic block) according to the effects of evaluating statement. Read more
fn terminator_effect(
&self,
sets: &mut BlockSets<MoveOutIndex>,
location: Location
)
[src]
fn terminator_effect(
&self,
sets: &mut BlockSets<MoveOutIndex>,
location: Location
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Mutates the block-sets (the flow sets for the given basic block) according to the effects of evaluating the terminator. Read more
fn propagate_call_return(
&self,
in_out: &mut IdxSet<MoveOutIndex>,
_call_bb: BasicBlock,
_dest_bb: BasicBlock,
dest_place: &Place
)
[src]
fn propagate_call_return(
&self,
in_out: &mut IdxSet<MoveOutIndex>,
_call_bb: BasicBlock,
_dest_bb: BasicBlock,
dest_place: &Place
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Mutates the block-sets according to the (flow-dependent) effect of a successful return from a Call terminator. Read more
fn accumulates_intrablock_state() -> bool
[src]
fn accumulates_intrablock_state() -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Some analyses want to accumulate knowledge within a block when analyzing its statements for building the gen/kill sets. Override this method to return true in such cases. Read more
fn before_statement_effect(
&self,
_sets: &mut BlockSets<Self::Idx>,
_location: Location
)
[src]
fn before_statement_effect(
&self,
_sets: &mut BlockSets<Self::Idx>,
_location: Location
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Similar to statement_effect
, except it applies just before the statement rather than just after it. Read more
fn before_terminator_effect(
&self,
_sets: &mut BlockSets<Self::Idx>,
_location: Location
)
[src]
fn before_terminator_effect(
&self,
_sets: &mut BlockSets<Self::Idx>,
_location: Location
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Similar to terminator_effect
, except it applies just before the terminator rather than just after it. Read more
impl<'a, 'gcx, 'tcx> BitwiseOperator for MovingOutStatements<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> BitwiseOperator for MovingOutStatements<'a, 'gcx, 'tcx>
fn join(&self, pred1: Word, pred2: Word) -> Word
[src]
fn join(&self, pred1: Word, pred2: Word) -> Word
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Applies some bit-operation pointwise to each of the bits in the two inputs.
impl<'a, 'gcx, 'tcx> InitialFlow for MovingOutStatements<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> InitialFlow for MovingOutStatements<'a, 'gcx, 'tcx>
fn bottom_value() -> bool
[src]
fn bottom_value() -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Specifies the initial value for each bit in the on_entry
set
Auto Trait Implementations
impl<'a, 'gcx, 'tcx> !Send for MovingOutStatements<'a, 'gcx, 'tcx>
impl<'a, 'gcx, 'tcx> !Send for MovingOutStatements<'a, 'gcx, 'tcx>
impl<'a, 'gcx, 'tcx> !Sync for MovingOutStatements<'a, 'gcx, 'tcx>
impl<'a, 'gcx, 'tcx> !Sync for MovingOutStatements<'a, 'gcx, 'tcx>