Struct rustc::middle::expr_use_visitor::ExprUseVisitor
[−]
[src]
pub struct ExprUseVisitor<'a, 'gcx: 'a + 'tcx, 'tcx: 'a> { /* fields omitted */ }🔬 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> ExprUseVisitor<'a, 'tcx, 'tcx>[src]
pub fn new(
delegate: &'a mut (Delegate<'tcx> + 'a),
tcx: TyCtxt<'a, 'tcx, 'tcx>,
param_env: ParamEnv<'tcx>,
region_scope_tree: &'a ScopeTree,
tables: &'a TypeckTables<'tcx>,
rvalue_promotable_map: Option<Rc<ItemLocalSet>>
) -> Self[src]
delegate: &'a mut (Delegate<'tcx> + 'a),
tcx: TyCtxt<'a, 'tcx, 'tcx>,
param_env: ParamEnv<'tcx>,
region_scope_tree: &'a ScopeTree,
tables: &'a TypeckTables<'tcx>,
rvalue_promotable_map: Option<Rc<ItemLocalSet>>
) -> 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?
Creates the ExprUseVisitor, configuring it with the various options provided:
delegate-- who receives the callbacksparam_env--- parameter environment for trait lookups (esp. pertaining toCopy)region_scope_tree--- region scope tree for the code being analyzedtables--- typeck results for the code being analyzedrvalue_promotable_map--- if you care about rvalue promotion, then provide the map here (it can be computed withtcx.rvalue_promotable_map(def_id)).Nonemeans that rvalues will be given more conservative lifetimes.
See also with_infer, which is used during typeck.
impl<'a, 'gcx, 'tcx> ExprUseVisitor<'a, 'gcx, 'tcx>[src]
pub fn with_infer(
delegate: &'a mut (Delegate<'tcx> + 'a),
infcx: &'a InferCtxt<'a, 'gcx, 'tcx>,
param_env: ParamEnv<'tcx>,
region_scope_tree: &'a ScopeTree,
tables: &'a TypeckTables<'tcx>
) -> Self[src]
delegate: &'a mut (Delegate<'tcx> + 'a),
infcx: &'a InferCtxt<'a, 'gcx, 'tcx>,
param_env: ParamEnv<'tcx>,
region_scope_tree: &'a ScopeTree,
tables: &'a TypeckTables<'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 fn consume_body(&mut self, body: &Body)[src]
🔬 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 consume_expr(&mut self, expr: &Expr)[src]
🔬 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 walk_expr(&mut self, expr: &Expr)[src]
🔬 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?