[][src]Struct rustc_typeck::check::upvar::InferBorrowKind

struct InferBorrowKind<'a, 'tcx> {
    fcx: &'a FnCtxt<'a, 'tcx>,
    closure_def_id: DefId,
    current_closure_kind: ClosureKind,
    current_origin: Option<(Span, Name)>,
    adjust_upvar_captures: UpvarCaptureMap<'tcx>,
}
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Fields

fcx: &'a FnCtxt<'a, 'tcx>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

closure_def_id: DefId
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

current_closure_kind: ClosureKind
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

current_origin: Option<(Span, Name)>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

adjust_upvar_captures: UpvarCaptureMap<'tcx>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Methods

impl<'a, 'tcx> InferBorrowKind<'a, 'tcx>[src]

fn adjust_upvar_borrow_kind_for_consume(
    &mut self,
    cmt: &cmt_<'tcx>,
    mode: ConsumeMode
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn adjust_upvar_borrow_kind_for_mut(&mut self, cmt: &cmt_<'tcx>)[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Indicates that cmt is being directly mutated (e.g., assigned to). If cmt contains any by-ref upvars, this implies that those upvars must be borrowed using an &mut borrow.

fn adjust_upvar_borrow_kind_for_unique(&mut self, cmt: &cmt_<'tcx>)[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn try_adjust_upvar_deref(
    &mut self,
    cmt: &cmt_<'tcx>,
    borrow_kind: BorrowKind
) -> bool
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn adjust_upvar_borrow_kind(&mut self, upvar_id: UpvarId, kind: BorrowKind)[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

We infer the borrow_kind with which to borrow upvars in a stack closure. The borrow_kind basically follows a lattice of imm < unique-imm < mut, moving from left to right as needed (but never right to left). Here the argument mutbl is the borrow_kind that is required by some particular use.

fn adjust_closure_kind(
    &mut self,
    closure_id: LocalDefId,
    new_kind: ClosureKind,
    upvar_span: Span,
    var_name: Name
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Trait Implementations

impl<'a, 'tcx> Delegate<'tcx> for InferBorrowKind<'a, 'tcx>[src]

fn nested_body(&mut self, _body_id: BodyId)[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Auto Trait Implementations

impl<'a, 'tcx> !Sync for InferBorrowKind<'a, 'tcx>

impl<'a, 'tcx> !Send for InferBorrowKind<'a, 'tcx>

impl<'a, 'tcx> Unpin for InferBorrowKind<'a, 'tcx> where
    'tcx: 'a, 

impl<'a, 'tcx> !RefUnwindSafe for InferBorrowKind<'a, 'tcx>

impl<'a, 'tcx> !UnwindSafe for InferBorrowKind<'a, 'tcx>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<E> SpecializationError for E[src]

impl<T> Erased for T[src]

impl<T> MaybeResult<T> for T[src]

type Error = !

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

impl<T> Erased for T