Struct rustc_mir::borrow_check::MirBorrowckCtxt [−][src]
pub struct MirBorrowckCtxt<'cx, 'gcx: 'tcx, 'tcx: 'cx> {
tcx: TyCtxt<'cx, 'gcx, 'tcx>,
mir: &'cx Mir<'tcx>,
mir_def_id: DefId,
move_data: &'cx MoveData<'tcx>,
param_env: ParamEnv<'gcx>,
movable_generator: bool,
locals_are_invalidated_at_exit: bool,
access_place_error_reported: FxHashSet<(Place<'tcx>, Span)>,
reservation_error_reported: FxHashSet<Place<'tcx>>,
moved_error_reported: FxHashSet<Place<'tcx>>,
used_mut: FxHashSet<Local>,
used_mut_upvars: SmallVec<[Field; 8]>,
nonlexical_regioncx: Rc<RegionInferenceContext<'tcx>>,
borrow_set: Rc<BorrowSet<'tcx>>,
dominators: Dominators<BasicBlock>,
}🔬 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?
Fields
tcx: TyCtxt<'cx, '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: &'cx 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?
mir_def_id: DefId
🔬 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?
move_data: &'cx 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?
param_env: ParamEnv<'gcx>
🔬 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?
movable_generator: 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?
locals_are_invalidated_at_exit: 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?
This keeps track of whether local variables are free-ed when the function
exits even without a StorageDead, which appears to be the case for
constants.
I'm not sure this is the right approach - @eddyb could you try and figure this out?
access_place_error_reported: FxHashSet<(Place<'tcx>, Span)>
🔬 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?
This field keeps track of when borrow errors are reported in the access_place function
so that there is no duplicate reporting. This field cannot also be used for the conflicting
borrow errors that is handled by the reservation_error_reported field as the inclusion
of the Span type (while required to mute some errors) stops the muting of the reservation
errors.
reservation_error_reported: FxHashSet<Place<'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?
This field keeps track of when borrow conflict errors are reported for reservations, so that we don't report seemingly duplicate errors for corresponding activations
FIXME: Ideally this would be a set of BorrowIndex, not Places, but it is currently inconvenient to track down the BorrowIndex at the time we detect and report a reservation error.
moved_error_reported: FxHashSet<Place<'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?
This field keeps track of errors reported in the checking of moved variables, so that we don't report report seemingly duplicate errors.
used_mut: FxHashSet<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?
This field keeps track of all the local variables that are declared mut and are mutated. Used for the warning issued by an unused mutable local variable.
used_mut_upvars: SmallVec<[Field; 8]>
🔬 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?
If the function we're checking is a closure, then we'll need to report back the list of mutable upvars that have been used. This field keeps track of them.
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?
Non-lexical region inference context, if NLL is enabled. This contains the results from region inference and lets us e.g. find out which CFG points are contained in each borrow region.
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?
The set of borrows extracted from the MIR
dominators: Dominators<BasicBlock>
🔬 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?
Dominators for MIR
Methods
impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx>[src]
impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx>pub(super) fn report_use_of_moved_or_uninitialized(
&mut self,
_context: Context,
desired_action: InitializationRequiringAction,
(place, span): (&Place<'tcx>, Span),
mpi: MovePathIndex,
curr_move_out: &FlowAtLocation<MovingOutStatements<'_, 'gcx, 'tcx>>
)[src]
pub(super) fn report_use_of_moved_or_uninitialized(
&mut self,
_context: Context,
desired_action: InitializationRequiringAction,
(place, span): (&Place<'tcx>, Span),
mpi: MovePathIndex,
curr_move_out: &FlowAtLocation<MovingOutStatements<'_, '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?
pub(super) fn report_move_out_while_borrowed(
&mut self,
context: Context,
(place, span): (&Place<'tcx>, Span),
borrow: &BorrowData<'tcx>
)[src]
pub(super) fn report_move_out_while_borrowed(
&mut self,
context: Context,
(place, span): (&Place<'tcx>, Span),
borrow: &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(super) fn report_use_while_mutably_borrowed(
&mut self,
context: Context,
(place, span): (&Place<'tcx>, Span),
borrow: &BorrowData<'tcx>
)[src]
pub(super) fn report_use_while_mutably_borrowed(
&mut self,
context: Context,
(place, span): (&Place<'tcx>, Span),
borrow: &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?
fn find_closure_span(
&self,
maybe_closure_span: Span,
location: Location
) -> Option<(Span, Span)>[src]
fn find_closure_span(
&self,
maybe_closure_span: Span,
location: Location
) -> Option<(Span, Span)>🔬 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?
Finds the span of arguments of a closure (within maybe_closure_span) and its usage of
the local assigned at location.
This is done by searching in statements succeeding location
and originating from maybe_closure_span.
pub(super) fn report_conflicting_borrow(
&mut self,
context: Context,
(place, span): (&Place<'tcx>, Span),
gen_borrow_kind: BorrowKind,
issued_borrow: &BorrowData<'tcx>
)[src]
pub(super) fn report_conflicting_borrow(
&mut self,
context: Context,
(place, span): (&Place<'tcx>, Span),
gen_borrow_kind: BorrowKind,
issued_borrow: &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(super) fn report_borrowed_value_does_not_live_long_enough(
&mut self,
context: Context,
borrow: &BorrowData<'tcx>,
place_span: (&Place<'tcx>, Span),
kind: Option<WriteKind>
)[src]
pub(super) fn report_borrowed_value_does_not_live_long_enough(
&mut self,
context: Context,
borrow: &BorrowData<'tcx>,
place_span: (&Place<'tcx>, Span),
kind: Option<WriteKind>
)🔬 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 report_scoped_local_value_does_not_live_long_enough(
&mut self,
context: Context,
name: &String,
_scope_tree: &Lrc<ScopeTree>,
borrow: &BorrowData<'tcx>,
drop_span: Span,
borrow_span: Span,
_proper_span: Span
)[src]
fn report_scoped_local_value_does_not_live_long_enough(
&mut self,
context: Context,
name: &String,
_scope_tree: &Lrc<ScopeTree>,
borrow: &BorrowData<'tcx>,
drop_span: Span,
borrow_span: Span,
_proper_span: Span
)🔬 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 report_scoped_temporary_value_does_not_live_long_enough(
&mut self,
context: Context,
_scope_tree: &Lrc<ScopeTree>,
borrow: &BorrowData<'tcx>,
drop_span: Span,
_borrow_span: Span,
proper_span: Span
)[src]
fn report_scoped_temporary_value_does_not_live_long_enough(
&mut self,
context: Context,
_scope_tree: &Lrc<ScopeTree>,
borrow: &BorrowData<'tcx>,
drop_span: Span,
_borrow_span: Span,
proper_span: Span
)🔬 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 report_unscoped_local_value_does_not_live_long_enough(
&mut self,
context: Context,
name: &String,
scope_tree: &Lrc<ScopeTree>,
borrow: &BorrowData<'tcx>,
drop_span: Span,
borrow_span: Span,
_proper_span: Span,
kind_place: Option<(WriteKind, &Place<'tcx>)>
)[src]
fn report_unscoped_local_value_does_not_live_long_enough(
&mut self,
context: Context,
name: &String,
scope_tree: &Lrc<ScopeTree>,
borrow: &BorrowData<'tcx>,
drop_span: Span,
borrow_span: Span,
_proper_span: Span,
kind_place: Option<(WriteKind, &Place<'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?
fn report_unscoped_temporary_value_does_not_live_long_enough(
&mut self,
context: Context,
scope_tree: &Lrc<ScopeTree>,
borrow: &BorrowData<'tcx>,
drop_span: Span,
_borrow_span: Span,
proper_span: Span
)[src]
fn report_unscoped_temporary_value_does_not_live_long_enough(
&mut self,
context: Context,
scope_tree: &Lrc<ScopeTree>,
borrow: &BorrowData<'tcx>,
drop_span: Span,
_borrow_span: Span,
proper_span: Span
)🔬 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(super) fn report_illegal_mutation_of_borrowed(
&mut self,
context: Context,
(place, span): (&Place<'tcx>, Span),
loan: &BorrowData<'tcx>
)[src]
pub(super) fn report_illegal_mutation_of_borrowed(
&mut self,
context: Context,
(place, span): (&Place<'tcx>, Span),
loan: &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(super) fn report_illegal_reassignment(
&mut self,
_context: Context,
(place, span): (&Place<'tcx>, Span),
assigned_span: Span,
err_place: &Place<'tcx>
)[src]
pub(super) fn report_illegal_reassignment(
&mut self,
_context: Context,
(place, span): (&Place<'tcx>, Span),
assigned_span: Span,
err_place: &Place<'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?
Reports an illegal reassignment; for example, an assignment to
(part of) a non-mut local that occurs potentially after that
local has already been initialized. place is the path being
assigned; err_place is a place providing a reason why
place is not mutable (e.g. the non-mut local x in an
assignment to x.f).
impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx>[src]
impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx>pub(super) fn describe_place(
&self,
place: &Place<'tcx>
) -> Option<String>[src]
pub(super) fn describe_place(
&self,
place: &Place<'tcx>
) -> Option<String>🔬 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 append_place_to_string(
&self,
place: &Place<'tcx>,
buf: &mut String,
autoderef: bool
) -> Result<(), ()>[src]
fn append_place_to_string(
&self,
place: &Place<'tcx>,
buf: &mut String,
autoderef: bool
) -> Result<(), ()>🔬 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 append_local_to_string(
&self,
local_index: Local,
buf: &mut String
) -> Result<(), ()>[src]
fn append_local_to_string(
&self,
local_index: Local,
buf: &mut String
) -> Result<(), ()>🔬 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 describe_field(&self, base: &Place, field: Field) -> String[src]
fn describe_field(&self, base: &Place, field: Field) -> String🔬 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 describe_field_from_ty(&self, ty: &Ty, field: Field) -> String[src]
fn describe_field_from_ty(&self, ty: &Ty, field: Field) -> String🔬 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 retrieve_borrow_span(&self, borrow: &BorrowData) -> Span[src]
pub(crate) fn retrieve_borrow_span(&self, borrow: &BorrowData) -> Span🔬 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 retrieve_type_for_place(&self, place: &Place<'tcx>) -> Option<Ty>[src]
fn retrieve_type_for_place(&self, place: &Place<'tcx>) -> Option<Ty>🔬 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<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx>[src]
impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx>ⓘImportant traits for Prefixes<'cx, 'gcx, 'tcx>pub(super) fn prefixes(
&self,
place: &'cx Place<'tcx>,
kind: PrefixSet
) -> Prefixes<'cx, 'gcx, 'tcx>[src]
pub(super) fn prefixes(
&self,
place: &'cx Place<'tcx>,
kind: PrefixSet
) -> Prefixes<'cx, '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?
Returns an iterator over the prefixes of place
(inclusive) from longest to smallest, potentially
terminating the iteration early based on kind.
impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx>[src]
impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx>pub(in borrow_check) fn explain_why_borrow_contains_point(
&mut self,
context: Context,
borrow: &BorrowData<'tcx>,
kind_place: Option<(WriteKind, &Place<'tcx>)>,
err: &mut DiagnosticBuilder
)[src]
pub(in borrow_check) fn explain_why_borrow_contains_point(
&mut self,
context: Context,
borrow: &BorrowData<'tcx>,
kind_place: Option<(WriteKind, &Place<'tcx>)>,
err: &mut DiagnosticBuilder
)🔬 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?
Adds annotations to err explaining why the borrow contains the
point from context. This is key for the "3-point errors"
described in the NLL RFC.
Parameters
borrow: the borrow in questioncontext: where the borrow occurskind_place: if Some, this describes the statement that triggered the error.- first half is the kind of write, if any, being performed
- second half is the place being accessed
err: where the error annotations are going to be added
impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx>[src]
impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx>fn visit_terminator_drop(
&mut self,
loc: Location,
term: &Terminator<'tcx>,
flow_state: &Flows<'cx, 'gcx, 'tcx>,
drop_place: &Place<'tcx>,
erased_drop_place_ty: Ty<'gcx>,
span: Span
)[src]
fn visit_terminator_drop(
&mut self,
loc: Location,
term: &Terminator<'tcx>,
flow_state: &Flows<'cx, 'gcx, 'tcx>,
drop_place: &Place<'tcx>,
erased_drop_place_ty: Ty<'gcx>,
span: Span
)🔬 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?
Invokes access_place as appropriate for dropping the value
at drop_place. Note that the actual Drop in the MIR is
always for a variable (e.g., Drop(x)) -- but we recursively
break this variable down into subpaths (e.g., Drop(x.foo))
to indicate more precisely which fields might actually be
accessed by a destructor.
fn access_place(
&mut self,
context: Context,
place_span: (&Place<'tcx>, Span),
kind: (ShallowOrDeep, ReadOrWrite),
is_local_mutation_allowed: LocalMutationIsAllowed,
flow_state: &Flows<'cx, 'gcx, 'tcx>
) -> AccessErrorsReported[src]
fn access_place(
&mut self,
context: Context,
place_span: (&Place<'tcx>, Span),
kind: (ShallowOrDeep, ReadOrWrite),
is_local_mutation_allowed: LocalMutationIsAllowed,
flow_state: &Flows<'cx, 'gcx, 'tcx>
) -> AccessErrorsReported🔬 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?
Checks an access to the given place to see if it is allowed. Examines the set of borrows that are in scope, as well as which paths have been initialized, to ensure that (a) the place is initialized and (b) it is not borrowed in some way that would prevent this access.
Returns true if an error is reported, false otherwise.
fn check_access_for_conflict(
&mut self,
context: Context,
place_span: (&Place<'tcx>, Span),
sd: ShallowOrDeep,
rw: ReadOrWrite,
flow_state: &Flows<'cx, 'gcx, 'tcx>
) -> bool[src]
fn check_access_for_conflict(
&mut self,
context: Context,
place_span: (&Place<'tcx>, Span),
sd: ShallowOrDeep,
rw: ReadOrWrite,
flow_state: &Flows<'cx, 'gcx, 'tcx>
) -> 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?
fn mutate_place(
&mut self,
context: Context,
place_span: (&Place<'tcx>, Span),
kind: ShallowOrDeep,
mode: MutateMode,
flow_state: &Flows<'cx, 'gcx, 'tcx>
)[src]
fn mutate_place(
&mut self,
context: Context,
place_span: (&Place<'tcx>, Span),
kind: ShallowOrDeep,
mode: MutateMode,
flow_state: &Flows<'cx, '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?
fn consume_rvalue(
&mut self,
context: Context,
(rvalue, span): (&Rvalue<'tcx>, Span),
_location: Location,
flow_state: &Flows<'cx, 'gcx, 'tcx>
)[src]
fn consume_rvalue(
&mut self,
context: Context,
(rvalue, span): (&Rvalue<'tcx>, Span),
_location: Location,
flow_state: &Flows<'cx, '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?
fn consume_operand(
&mut self,
context: Context,
(operand, span): (&Operand<'tcx>, Span),
flow_state: &Flows<'cx, 'gcx, 'tcx>
)[src]
fn consume_operand(
&mut self,
context: Context,
(operand, span): (&Operand<'tcx>, Span),
flow_state: &Flows<'cx, '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?
fn check_for_invalidation_at_exit(
&mut self,
context: Context,
borrow: &BorrowData<'tcx>,
span: Span
)[src]
fn check_for_invalidation_at_exit(
&mut self,
context: Context,
borrow: &BorrowData<'tcx>,
span: Span
)🔬 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?
Returns whether a borrow of this place is invalidated when the function exits
fn check_for_local_borrow(
&mut self,
borrow: &BorrowData<'tcx>,
yield_span: Span
)[src]
fn check_for_local_borrow(
&mut self,
borrow: &BorrowData<'tcx>,
yield_span: Span
)🔬 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?
Reports an error if this is a borrow of local data. This is called for all Yield statements on movable generators
fn check_activations(
&mut self,
location: Location,
span: Span,
flow_state: &Flows<'cx, 'gcx, 'tcx>
)[src]
fn check_activations(
&mut self,
location: Location,
span: Span,
flow_state: &Flows<'cx, '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?
impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx>[src]
impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx>fn check_if_reassignment_to_immutable_state(
&mut self,
context: Context,
(place, span): (&Place<'tcx>, Span),
flow_state: &Flows<'cx, 'gcx, 'tcx>
)[src]
fn check_if_reassignment_to_immutable_state(
&mut self,
context: Context,
(place, span): (&Place<'tcx>, Span),
flow_state: &Flows<'cx, '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?
fn check_if_full_path_is_moved(
&mut self,
context: Context,
desired_action: InitializationRequiringAction,
place_span: (&Place<'tcx>, Span),
flow_state: &Flows<'cx, 'gcx, 'tcx>
)[src]
fn check_if_full_path_is_moved(
&mut self,
context: Context,
desired_action: InitializationRequiringAction,
place_span: (&Place<'tcx>, Span),
flow_state: &Flows<'cx, '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?
fn check_if_path_or_subpath_is_moved(
&mut self,
context: Context,
desired_action: InitializationRequiringAction,
place_span: (&Place<'tcx>, Span),
flow_state: &Flows<'cx, 'gcx, 'tcx>
)[src]
fn check_if_path_or_subpath_is_moved(
&mut self,
context: Context,
desired_action: InitializationRequiringAction,
place_span: (&Place<'tcx>, Span),
flow_state: &Flows<'cx, '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?
fn move_path_closest_to(
&mut self,
place: &Place<'tcx>
) -> Result<MovePathIndex, NoMovePathFound>[src]
fn move_path_closest_to(
&mut self,
place: &Place<'tcx>
) -> Result<MovePathIndex, NoMovePathFound>🔬 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?
Currently MoveData does not store entries for all places in the input MIR. For example it will currently filter out places that are Copy; thus we do not track places of shared reference type. This routine will walk up a place along its prefixes, searching for a foundational place that is tracked in the MoveData.
An Err result includes a tag indicated why the search failed. Currently this can only occur if the place is built off of a static variable, as we do not track those in the MoveData.
fn move_path_for_place(&mut self, place: &Place<'tcx>) -> Option<MovePathIndex>[src]
fn move_path_for_place(&mut self, place: &Place<'tcx>) -> Option<MovePathIndex>🔬 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 check_if_assigned_path_is_moved(
&mut self,
context: Context,
(place, span): (&Place<'tcx>, Span),
flow_state: &Flows<'cx, 'gcx, 'tcx>
)[src]
fn check_if_assigned_path_is_moved(
&mut self,
context: Context,
(place, span): (&Place<'tcx>, Span),
flow_state: &Flows<'cx, '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?
fn check_access_permissions(
&mut self,
(place, span): (&Place<'tcx>, Span),
kind: ReadOrWrite,
is_local_mutation_allowed: LocalMutationIsAllowed,
flow_state: &Flows<'cx, 'gcx, 'tcx>
) -> bool[src]
fn check_access_permissions(
&mut self,
(place, span): (&Place<'tcx>, Span),
kind: ReadOrWrite,
is_local_mutation_allowed: LocalMutationIsAllowed,
flow_state: &Flows<'cx, 'gcx, 'tcx>
) -> 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?
Check the permissions for the given place and read or write kind
Returns true if an error is reported, false otherwise.
fn add_used_mut<'d>(
&mut self,
root_place: RootPlace<'d, 'tcx>,
flow_state: &Flows<'cx, 'gcx, 'tcx>
)[src]
fn add_used_mut<'d>(
&mut self,
root_place: RootPlace<'d, 'tcx>,
flow_state: &Flows<'cx, '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?
Adds the place into the used mutable variables set
fn is_mutable<'d>(
&self,
place: &'d Place<'tcx>,
is_local_mutation_allowed: LocalMutationIsAllowed
) -> Result<RootPlace<'d, 'tcx>, &'d Place<'tcx>>[src]
fn is_mutable<'d>(
&self,
place: &'d Place<'tcx>,
is_local_mutation_allowed: LocalMutationIsAllowed
) -> Result<RootPlace<'d, 'tcx>, &'d Place<'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?
Whether this value be written or borrowed mutably. Returns the root place if the place passed in is a projection.
fn is_upvar_field_projection(&self, place: &Place<'tcx>) -> Option<Field>[src]
fn is_upvar_field_projection(&self, place: &Place<'tcx>) -> Option<Field>🔬 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?
If this is a field projection, and the field is being projected from a closure type,
then returns the index of the field being projected. Note that this closure will always
be self in the current MIR, because that is the only time we directly access the fields
of a closure type.
impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx>[src]
impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx>fn base_path<'d>(&self, place: &'d Place<'tcx>) -> &'d Place<'tcx>[src]
fn base_path<'d>(&self, place: &'d Place<'tcx>) -> &'d Place<'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?
Returns the base of the leftmost (deepest) dereference of an
Box in place. If there is no dereference of an Box
in place, then it just returns place itself.
Trait Implementations
impl<'cx, 'gcx, 'tcx> DataflowResultsConsumer<'cx, 'tcx> for MirBorrowckCtxt<'cx, 'gcx, 'tcx>[src]
impl<'cx, 'gcx, 'tcx> DataflowResultsConsumer<'cx, 'tcx> for MirBorrowckCtxt<'cx, 'gcx, 'tcx>type FlowState = Flows<'cx, '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?
fn mir(&self) -> &'cx Mir<'tcx>[src]
fn mir(&self) -> &'cx 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?
fn visit_block_entry(&mut self, bb: BasicBlock, flow_state: &Self::FlowState)[src]
fn visit_block_entry(&mut self, bb: BasicBlock, flow_state: &Self::FlowState)🔬 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 visit_statement_entry(
&mut self,
location: Location,
stmt: &Statement<'tcx>,
flow_state: &Self::FlowState
)[src]
fn visit_statement_entry(
&mut self,
location: Location,
stmt: &Statement<'tcx>,
flow_state: &Self::FlowState
)🔬 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 visit_terminator_entry(
&mut self,
location: Location,
term: &Terminator<'tcx>,
flow_state: &Self::FlowState
)[src]
fn visit_terminator_entry(
&mut self,
location: Location,
term: &Terminator<'tcx>,
flow_state: &Self::FlowState
)🔬 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 analyze_results(&mut self, flow_uninit: &mut Self::FlowState)[src]
fn analyze_results(&mut self, flow_uninit: &mut Self::FlowState)🔬 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 process_basic_block(
&mut self,
bb: BasicBlock,
flow_state: &mut Self::FlowState
)[src]
fn process_basic_block(
&mut self,
bb: BasicBlock,
flow_state: &mut Self::FlowState
)🔬 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?
Auto Trait Implementations
impl<'cx, 'gcx, 'tcx> !Send for MirBorrowckCtxt<'cx, 'gcx, 'tcx>
impl<'cx, 'gcx, 'tcx> !Send for MirBorrowckCtxt<'cx, 'gcx, 'tcx>impl<'cx, 'gcx, 'tcx> !Sync for MirBorrowckCtxt<'cx, 'gcx, 'tcx>
impl<'cx, 'gcx, 'tcx> !Sync for MirBorrowckCtxt<'cx, 'gcx, 'tcx>