[−][src]Struct rustc_mir::dataflow::impls::borrows::Borrows
🔬 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?
Borrows
stores the data used in the analyses that track the flow
of borrows.
It uniquely identifies every borrow (Rvalue::Ref
) by a
BorrowIndex
, and maps each such index to a BorrowData
describing the borrow. These indexes are used for representing the
borrows in compact bitvectors.
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?
scope_tree: Lrc<ScopeTree>
🔬 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?
root_scope: Option<Scope>
🔬 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?
borrow_set: Rc<BorrowSet<'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?
borrows_out_of_scope_at_location: FxHashMap<Location, Vec<BorrowIndex>>
🔬 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?
_nonlexical_regioncx: Rc<RegionInferenceContext<'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?
NLL region inference context with which NLL queries should be resolved
Methods
impl<'a, 'gcx, 'tcx> Borrows<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> Borrows<'a, 'gcx, 'tcx>
pub(crate) fn new(
tcx: TyCtxt<'a, 'gcx, 'tcx>,
mir: &'a Mir<'tcx>,
nonlexical_regioncx: Rc<RegionInferenceContext<'tcx>>,
def_id: DefId,
body_id: Option<BodyId>,
borrow_set: &Rc<BorrowSet<'tcx>>
) -> Self
[src]
pub(crate) fn new(
tcx: TyCtxt<'a, 'gcx, 'tcx>,
mir: &'a Mir<'tcx>,
nonlexical_regioncx: Rc<RegionInferenceContext<'tcx>>,
def_id: DefId,
body_id: Option<BodyId>,
borrow_set: &Rc<BorrowSet<'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?
pub(crate) fn borrows(&self) -> &IndexVec<BorrowIndex, BorrowData<'tcx>>
[src]
pub(crate) fn borrows(&self) -> &IndexVec<BorrowIndex, BorrowData<'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?
pub fn scope_tree(&self) -> &Lrc<ScopeTree>
[src]
pub fn scope_tree(&self) -> &Lrc<ScopeTree>
🔬 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?
pub fn location(&self, idx: BorrowIndex) -> &Location
[src]
pub fn location(&self, idx: BorrowIndex) -> &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?
fn kill_loans_out_of_scope_at_location(
&self,
sets: &mut BlockSets<BorrowIndex>,
location: Location
)
[src]
fn kill_loans_out_of_scope_at_location(
&self,
sets: &mut BlockSets<BorrowIndex>,
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?
Add all borrows to the kill set, if those borrows are out of scope at location
.
That means either they went out of either a nonlexical scope, if we care about those
at the moment, or the location represents a lexical EndRegion
fn kill_borrows_on_local(
&self,
sets: &mut BlockSets<BorrowIndex>,
local: &Local
)
[src]
fn kill_borrows_on_local(
&self,
sets: &mut BlockSets<BorrowIndex>,
local: &Local
)
🔬 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> BitDenotation for Borrows<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> BitDenotation for Borrows<'a, 'gcx, 'tcx>
type Idx = BorrowIndex
🔬 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, _entry_set: &mut IdxSet<BorrowIndex>)
[src]
fn start_block_effect(&self, _entry_set: &mut IdxSet<BorrowIndex>)
🔬 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 before_statement_effect(
&self,
sets: &mut BlockSets<BorrowIndex>,
location: Location
)
[src]
fn before_statement_effect(
&self,
sets: &mut BlockSets<BorrowIndex>,
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 statement_effect(
&self,
sets: &mut BlockSets<BorrowIndex>,
location: Location
)
[src]
fn statement_effect(
&self,
sets: &mut BlockSets<BorrowIndex>,
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 before_terminator_effect(
&self,
sets: &mut BlockSets<BorrowIndex>,
location: Location
)
[src]
fn before_terminator_effect(
&self,
sets: &mut BlockSets<BorrowIndex>,
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
fn terminator_effect(
&self,
sets: &mut BlockSets<BorrowIndex>,
location: Location
)
[src]
fn terminator_effect(
&self,
sets: &mut BlockSets<BorrowIndex>,
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<BorrowIndex>,
_call_bb: BasicBlock,
_dest_bb: BasicBlock,
_dest_place: &Place
)
[src]
fn propagate_call_return(
&self,
_in_out: &mut IdxSet<BorrowIndex>,
_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
impl<'a, 'gcx, 'tcx> BitwiseOperator for Borrows<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> BitwiseOperator for Borrows<'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 Borrows<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> InitialFlow for Borrows<'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 Borrows<'a, 'gcx, 'tcx>
impl<'a, 'gcx, 'tcx> !Send for Borrows<'a, 'gcx, 'tcx>
impl<'a, 'gcx, 'tcx> !Sync for Borrows<'a, 'gcx, 'tcx>
impl<'a, 'gcx, 'tcx> !Sync for Borrows<'a, 'gcx, 'tcx>
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T
[src]
fn borrow(&self) -> &T
Immutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<E> SpecializationError for E
[src]
impl<E> SpecializationError for E
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
[src]
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
🔬 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?
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S
is the encoder/decoder state type, T
is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more
impl<T> Erased for T
[src]
impl<T> Erased for T
impl<T> Send for T where
T: ?Sized,
[src]
impl<T> Send for T where
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
impl<T> Sync for T where
T: ?Sized,
impl<T> Erased for T
impl<T> Erased for T
impl<T> MaybeResult for T
[src]
impl<T> MaybeResult for T
fn from_ok(x: T) -> T
[src]
fn from_ok(x: T) -> T
🔬 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?
fn map_same<F>(self, f: F) -> T where
F: FnOnce(T) -> T,
[src]
fn map_same<F>(self, f: F) -> T where
F: FnOnce(T) -> T,
🔬 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, T> Captures for T where
T: ?Sized,
[src]
impl<'a, T> Captures for T where
T: ?Sized,