Struct rustc_trans::middle::borrowck::move_data::MoveDataExperimental
[-]
[+]
[src]
pub struct MoveData<'tcx> {
pub paths: RefCell<Vec<MovePath<'tcx>>>,
pub path_map: RefCell<HashMap<Rc<LoanPath<'tcx>>, MovePathIndex, FnvHasher>>,
pub moves: RefCell<Vec<Move>>,
pub var_assignments: RefCell<Vec<Assignment>>,
pub path_assignments: RefCell<Vec<Assignment>>,
pub variant_matches: RefCell<Vec<VariantMatch>>,
pub assignee_ids: RefCell<HashSet<u32, FnvHasher>>,
pub fragments: RefCell<FragmentSets>,
}Fields
Methods
impl<'tcx> MoveData<'tcx>
fn new() -> MoveData<'tcx>
fn path_loan_path(&self, index: MovePathIndex) -> Rc<LoanPath<'tcx>>
fn move_path(&self, tcx: &ctxt<'tcx>, lp: Rc<LoanPath<'tcx>>) -> 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<'tcx>, lp: Rc<LoanPath<'tcx>>, id: u32, 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<'tcx>, lp: Rc<LoanPath<'tcx>>, assign_id: u32, span: Span, assignee_id: u32, mode: MutateMode)
Adds a new record for an assignment to lp that occurs at location id with the given
span.
fn add_variant_match(&self, tcx: &ctxt<'tcx>, lp: Rc<LoanPath<'tcx>>, pattern_id: u32, base_lp: Rc<LoanPath<'tcx>>, mode: MatchMode)
Adds a new record for a match of base_lp, downcast to
variant lp, that occurs at location pattern_id. (One
should be able to recover the span info from the
pattern_id and the ast_map, I think.)