[−][src]Struct rustc_borrowck::borrowck::check_loans::CheckLoanCtxt
🔬 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
bccx: &'a BorrowckCtxt<'a, '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?
dfcx_loans: &'a DataFlowContext<'a, 'tcx, LoanDataFlowOperator>
🔬 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: &'a FlowedMoveData<'a, '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?
all_loans: &'a [Loan<'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?
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?
Methods
impl<'a, 'tcx> CheckLoanCtxt<'a, 'tcx>
[src]
impl<'a, 'tcx> CheckLoanCtxt<'a, 'tcx>
pub fn tcx(&self) -> TyCtxt<'a, 'tcx, 'tcx>
[src]
pub fn tcx(&self) -> TyCtxt<'a, 'tcx, '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 each_issued_loan<F>(&self, node: ItemLocalId, op: F) -> bool where
F: FnMut(&Loan<'tcx>) -> bool,
[src]
pub fn each_issued_loan<F>(&self, node: ItemLocalId, op: F) -> bool where
F: FnMut(&Loan<'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?
Iterates over each loan that has been issued
on entrance to node
, regardless of whether it is
actually in scope at that point. Sometimes loans
are issued for future scopes and thus they may have been
issued but not yet be in effect.
pub fn each_in_scope_loan<F>(&self, scope: Scope, op: F) -> bool where
F: FnMut(&Loan<'tcx>) -> bool,
[src]
pub fn each_in_scope_loan<F>(&self, scope: Scope, op: F) -> bool where
F: FnMut(&Loan<'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?
Like each_issued_loan()
, but only considers loans that are
currently in scope.
fn each_in_scope_loan_affecting_path<F>(
&self,
scope: Scope,
loan_path: &LoanPath<'tcx>,
op: F
) -> bool where
F: FnMut(&Loan<'tcx>) -> bool,
[src]
fn each_in_scope_loan_affecting_path<F>(
&self,
scope: Scope,
loan_path: &LoanPath<'tcx>,
op: F
) -> bool where
F: FnMut(&Loan<'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?
Iterates through all of the in-scope loans affecting loan_path
,
calling op
, and ceasing iteration if false
is returned.
pub fn loans_generated_by(&self, node: ItemLocalId) -> Vec<usize>
[src]
pub fn loans_generated_by(&self, node: ItemLocalId) -> Vec<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?
Returns a vector of the loans that are generated as
we enter node
.
pub fn check_for_loans_across_yields(
&self,
cmt: &cmt_<'tcx>,
loan_region: Region<'tcx>,
borrow_span: Span
)
[src]
pub fn check_for_loans_across_yields(
&self,
cmt: &cmt_<'tcx>,
loan_region: Region<'tcx>,
borrow_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 fn check_for_conflicting_loans(&self, node: ItemLocalId)
[src]
pub fn check_for_conflicting_loans(&self, node: ItemLocalId)
🔬 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 to see whether any of the loans that are issued
on entrance to node
conflict with loans that have already been
issued when we enter node
(for example, we do not
permit two &mut
borrows of the same variable).
(Note that some loans can be issued without necessarily taking effect yet.)
pub fn report_error_if_loans_conflict(
&self,
old_loan: &Loan<'tcx>,
new_loan: &Loan<'tcx>
) -> bool
[src]
pub fn report_error_if_loans_conflict(
&self,
old_loan: &Loan<'tcx>,
new_loan: &Loan<'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?
Checks whether old_loan
and new_loan
can safely be issued
simultaneously.
pub fn report_error_if_loan_conflicts_with_restriction(
&self,
loan1: &Loan<'tcx>,
loan2: &Loan<'tcx>,
old_loan: &Loan<'tcx>,
new_loan: &Loan<'tcx>
) -> Result<(), DiagnosticBuilder<'a>>
[src]
pub fn report_error_if_loan_conflicts_with_restriction(
&self,
loan1: &Loan<'tcx>,
loan2: &Loan<'tcx>,
old_loan: &Loan<'tcx>,
new_loan: &Loan<'tcx>
) -> Result<(), DiagnosticBuilder<'a>>
🔬 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 whether the restrictions introduced by loan1
would
prohibit loan2
. Returns false if an error is reported.
fn consume_common(
&self,
id: ItemLocalId,
span: Span,
cmt: &cmt_<'tcx>,
mode: ConsumeMode
)
[src]
fn consume_common(
&self,
id: ItemLocalId,
span: Span,
cmt: &cmt_<'tcx>,
mode: ConsumeMode
)
🔬 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_copy_of_frozen_path(
&self,
id: ItemLocalId,
span: Span,
copy_path: &LoanPath<'tcx>
)
[src]
fn check_for_copy_of_frozen_path(
&self,
id: ItemLocalId,
span: Span,
copy_path: &LoanPath<'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_move_of_borrowed_path(
&self,
id: ItemLocalId,
span: Span,
move_path: &LoanPath<'tcx>,
move_kind: MoveKind
)
[src]
fn check_for_move_of_borrowed_path(
&self,
id: ItemLocalId,
span: Span,
move_path: &LoanPath<'tcx>,
move_kind: MoveKind
)
🔬 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 analyze_restrictions_on_use(
&self,
expr_id: ItemLocalId,
use_path: &LoanPath<'tcx>,
borrow_kind: BorrowKind
) -> UseError<'tcx>
[src]
pub fn analyze_restrictions_on_use(
&self,
expr_id: ItemLocalId,
use_path: &LoanPath<'tcx>,
borrow_kind: BorrowKind
) -> UseError<'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_is_moved(
&self,
id: ItemLocalId,
span: Span,
use_kind: MovedValueUseKind,
lp: &Rc<LoanPath<'tcx>>
)
[src]
fn check_if_path_is_moved(
&self,
id: ItemLocalId,
span: Span,
use_kind: MovedValueUseKind,
lp: &Rc<LoanPath<'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 error if expr
(which should be a path)
is using a moved/uninitialized value
fn check_if_assigned_path_is_moved(
&self,
id: ItemLocalId,
span: Span,
use_kind: MovedValueUseKind,
lp: &Rc<LoanPath<'tcx>>
)
[src]
fn check_if_assigned_path_is_moved(
&self,
id: ItemLocalId,
span: Span,
use_kind: MovedValueUseKind,
lp: &Rc<LoanPath<'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 error if assigning to lp
will use a
moved/uninitialized value. Mainly this is concerned with
detecting derefs of uninitialized pointers.
For example:
let a: i32; a = 10; // ok, even though a is uninitialized
struct Point { x: u32, y: u32 } let mut p: Point; p.x = 22; // ok, even though `p` is uninitialized
let mut p: Box<Point>; (*p).x = 22; // not ok, p is uninitialized, can't deref
fn check_assignment(
&self,
assignment_id: ItemLocalId,
assignment_span: Span,
assignee_cmt: &cmt_<'tcx>
)
[src]
fn check_assignment(
&self,
assignment_id: ItemLocalId,
assignment_span: Span,
assignee_cmt: &cmt_<'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 report_illegal_mutation(
&self,
span: Span,
loan_path: &LoanPath<'tcx>,
loan: &Loan
)
[src]
pub fn report_illegal_mutation(
&self,
span: Span,
loan_path: &LoanPath<'tcx>,
loan: &Loan
)
🔬 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, 'tcx> Delegate<'tcx> for CheckLoanCtxt<'a, 'tcx>
[src]
impl<'a, 'tcx> Delegate<'tcx> for CheckLoanCtxt<'a, 'tcx>
fn consume(
&mut self,
consume_id: NodeId,
consume_span: Span,
cmt: &cmt_<'tcx>,
mode: ConsumeMode
)
[src]
fn consume(
&mut self,
consume_id: NodeId,
consume_span: Span,
cmt: &cmt_<'tcx>,
mode: ConsumeMode
)
🔬 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 matched_pat(&mut self, _matched_pat: &Pat, _cmt: &cmt_, _mode: MatchMode)
[src]
fn matched_pat(&mut self, _matched_pat: &Pat, _cmt: &cmt_, _mode: MatchMode)
🔬 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_pat(
&mut self,
consume_pat: &Pat,
cmt: &cmt_<'tcx>,
mode: ConsumeMode
)
[src]
fn consume_pat(
&mut self,
consume_pat: &Pat,
cmt: &cmt_<'tcx>,
mode: ConsumeMode
)
🔬 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 borrow(
&mut self,
borrow_id: NodeId,
borrow_span: Span,
cmt: &cmt_<'tcx>,
loan_region: Region<'tcx>,
bk: BorrowKind,
loan_cause: LoanCause
)
[src]
fn borrow(
&mut self,
borrow_id: NodeId,
borrow_span: Span,
cmt: &cmt_<'tcx>,
loan_region: Region<'tcx>,
bk: BorrowKind,
loan_cause: LoanCause
)
🔬 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(
&mut self,
assignment_id: NodeId,
assignment_span: Span,
assignee_cmt: &cmt_<'tcx>,
mode: MutateMode
)
[src]
fn mutate(
&mut self,
assignment_id: NodeId,
assignment_span: Span,
assignee_cmt: &cmt_<'tcx>,
mode: MutateMode
)
🔬 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 decl_without_init(&mut self, _id: NodeId, _span: Span)
[src]
fn decl_without_init(&mut self, _id: NodeId, _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?
Auto Trait Implementations
impl<'a, 'tcx> !Send for CheckLoanCtxt<'a, 'tcx>
impl<'a, 'tcx> !Send for CheckLoanCtxt<'a, 'tcx>
impl<'a, 'tcx> !Sync for CheckLoanCtxt<'a, 'tcx>
impl<'a, 'tcx> !Sync for CheckLoanCtxt<'a, '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,