[][src]Struct rustc::middle::expr_use_visitor::ExprUseVisitor

pub struct ExprUseVisitor<'a, 'tcx> {
    mc: MemCategorizationContext<'a, 'tcx>,
    delegate: &'a mut dyn Delegate<'tcx>,
    param_env: ParamEnv<'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

mc: MemCategorizationContext<'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.

delegate: &'a mut dyn Delegate<'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.

param_env: ParamEnv<'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> ExprUseVisitor<'a, 'tcx>[src]

pub fn new(
    delegate: &'a mut (dyn Delegate<'tcx> + 'a),
    tcx: TyCtxt<'tcx>,
    body_owner: DefId,
    param_env: ParamEnv<'tcx>,
    region_scope_tree: &'a ScopeTree,
    tables: &'a TypeckTables<'tcx>
) -> Self
[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.

Creates the ExprUseVisitor, configuring it with the various options provided:

  • delegate -- who receives the callbacks
  • param_env --- parameter environment for trait lookups (esp. pertaining to Copy)
  • region_scope_tree --- region scope tree for the code being analyzed
  • tables --- typeck results for the code being analyzed

See also with_infer, which is used during typeck.

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

pub fn with_infer(
    delegate: &'a mut (dyn Delegate<'tcx> + 'a),
    infcx: &'a InferCtxt<'a, 'tcx>,
    body_owner: DefId,
    param_env: ParamEnv<'tcx>,
    region_scope_tree: &'a ScopeTree,
    tables: &'a TypeckTables<'tcx>
) -> Self
[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.

pub fn consume_body(&mut self, body: &Body)[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 tcx(&self) -> TyCtxt<'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 delegate_consume(&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 consume_exprs(&mut self, exprs: &[Expr])[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.

pub fn consume_expr(&mut self, expr: &Expr)[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 mutate_expr(&mut self, expr: &Expr)[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 borrow_expr(&mut self, expr: &Expr, bk: 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.

fn select_from_expr(&mut self, expr: &Expr)[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.

pub fn walk_expr(&mut self, expr: &Expr)[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 walk_callee(&mut self, call: &Expr, callee: &Expr)[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 walk_stmt(&mut self, stmt: &Stmt)[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 walk_local(&mut self, local: &Local)[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 walk_block(&mut self, blk: &Block)[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 the value of blk will be consumed, meaning either copied or moved depending on its type.

fn walk_struct_expr(&mut self, fields: &[Field], opt_with: &Option<P<Expr>>)[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 walk_adjustment(&mut self, expr: &Expr)[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 walk_autoref(
    &mut self,
    expr: &Expr,
    cmt_base: &cmt_<'tcx>,
    autoref: &AutoBorrow<'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.

Walks the autoref autoref applied to the autoderef'd expr. cmt_base is the mem-categorized form of expr after all relevant autoderefs have occurred.

fn walk_arm(&mut self, discr_cmt: cmt<'tcx>, arm: &Arm)[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 walk_irrefutable_pat(&mut self, cmt_discr: cmt<'tcx>, pat: &Pat)[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.

Walks a pat that occurs in isolation (i.e., top-level of fn argument or let binding, and not a match arm or nested pat.)

fn walk_pat(&mut self, cmt_discr: cmt<'tcx>, pat: &Pat)[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.

The core driver for walking a pattern

fn walk_captures(&mut self, closure_expr: &Expr, fn_decl_span: Span)[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 cat_captured_var(
    &mut self,
    closure_hir_id: HirId,
    closure_span: Span,
    var_id: HirId
) -> McResult<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.

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for 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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Erased for T[src]

impl<E> SpecializationError for E[src]