Trait rustc_typeck::expr_use_visitor::Delegate [−][src]
pub trait Delegate<'tcx> {
fn consume(
&mut self,
place_with_id: &PlaceWithHirId<'tcx>,
diag_expr_id: HirId,
mode: ConsumeMode
);
fn borrow(
&mut self,
place_with_id: &PlaceWithHirId<'tcx>,
diag_expr_id: HirId,
bk: BorrowKind
);
fn mutate(
&mut self,
assignee_place: &PlaceWithHirId<'tcx>,
diag_expr_id: HirId
);
fn fake_read(
&mut self,
place: Place<'tcx>,
cause: FakeReadCause,
diag_expr_id: HirId
);
}Expand description
This trait defines the callbacks you can expect to receive when employing the ExprUseVisitor.
Required methods
fn consume(
&mut self,
place_with_id: &PlaceWithHirId<'tcx>,
diag_expr_id: HirId,
mode: ConsumeMode
)fn borrow(
&mut self,
place_with_id: &PlaceWithHirId<'tcx>,
diag_expr_id: HirId,
bk: BorrowKind
)fn mutate(&mut self, assignee_place: &PlaceWithHirId<'tcx>, diag_expr_id: HirId)fn fake_read(
&mut self,
place: Place<'tcx>,
cause: FakeReadCause,
diag_expr_id: HirId
)