Trait rustc::middle::expr_use_visitor::Delegate
[−]
[src]
pub trait Delegate<'tcx> { fn consume(&mut self,
consume_id: NodeId,
consume_span: Span,
cmt: cmt<'tcx>,
mode: ConsumeMode); fn matched_pat(&mut self,
matched_pat: &Pat,
cmt: cmt<'tcx>,
mode: MatchMode); fn consume_pat(&mut self,
consume_pat: &Pat,
cmt: cmt<'tcx>,
mode: ConsumeMode); fn borrow(&mut self,
borrow_id: NodeId,
borrow_span: Span,
cmt: cmt<'tcx>,
loan_region: &'tcx Region,
bk: BorrowKind,
loan_cause: LoanCause); fn decl_without_init(&mut self, id: NodeId, span: Span); 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 trait defines the callbacks you can expect to receive when employing the ExprUseVisitor.
Required Methods
fn consume(&mut self,
consume_id: NodeId,
consume_span: Span,
cmt: cmt<'tcx>,
mode: ConsumeMode)
consume_id: NodeId,
consume_span: Span,
cmt: cmt<'tcx>,
mode: ConsumeMode)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn matched_pat(&mut self, matched_pat: &Pat, cmt: cmt<'tcx>, mode: MatchMode)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn consume_pat(&mut self, consume_pat: &Pat, cmt: cmt<'tcx>, mode: ConsumeMode)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn borrow(&mut self,
borrow_id: NodeId,
borrow_span: Span,
cmt: cmt<'tcx>,
loan_region: &'tcx Region,
bk: BorrowKind,
loan_cause: LoanCause)
borrow_id: NodeId,
borrow_span: Span,
cmt: cmt<'tcx>,
loan_region: &'tcx Region,
bk: BorrowKind,
loan_cause: LoanCause)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn decl_without_init(&mut self, id: NodeId, span: Span)
🔬 This is a nightly-only experimental API. (
rustc_private
)fn mutate(&mut self,
assignment_id: NodeId,
assignment_span: Span,
assignee_cmt: cmt<'tcx>,
mode: MutateMode)
assignment_id: NodeId,
assignment_span: Span,
assignee_cmt: cmt<'tcx>,
mode: MutateMode)
🔬 This is a nightly-only experimental API. (
rustc_private
)