Struct rustc::middle::borrowck::move_data::MoveData[src]
pub struct MoveData {
pub paths: RefCell<Vec<MovePath>>,
pub path_map: RefCell<HashMap<Rc<LoanPath>, MovePathIndex>>,
pub moves: RefCell<Vec<Move>>,
pub var_assignments: RefCell<Vec<Assignment>>,
pub path_assignments: RefCell<Vec<Assignment>>,
pub assignee_ids: RefCell<HashSet<NodeId>>,
}Fields
paths | Move paths. See section "Move paths" in |
path_map | Cache of loan path to move path index, for easy lookup. |
moves | Each move or uninitialized variable gets an entry here. |
var_assignments | Assignments to a variable, like |
path_assignments | Assignments to a path, like |
assignee_ids | Assignments to a variable or path, like |
Methods
impl MoveData
fn new() -> MoveData
fn move_path(&self, tcx: &ctxt, lp: Rc<LoanPath>) -> MovePathIndex
Returns the existing move path index for lp, if any,
and otherwise adds a new index for lp and any of its
base paths that do not yet have an index.
fn add_move(&self, tcx: &ctxt, lp: Rc<LoanPath>, id: NodeId, kind: MoveKind)
Adds a new move entry for a move of lp that occurs at
location id with kind kind.
fn add_assignment(&self, tcx: &ctxt, lp: Rc<LoanPath>, assign_id: NodeId, span: Span, assignee_id: NodeId, mode: MutateMode)
Adds a new record for an assignment to lp that occurs at
location id with the given span.