}
impl<T> LocationMap<T> where T: Default + Clone {
- fn new(mir: &Mir<'_>) -> Self {
+ fn new(mir: &Body<'_>) -> Self {
LocationMap {
map: mir.basic_blocks().iter().map(|block| {
vec![T::default(); block.statements.len()+1]
}
impl Init {
- crate fn span<'gcx>(&self, mir: &Mir<'gcx>) -> Span {
+ crate fn span<'gcx>(&self, mir: &Body<'gcx>) -> Span {
match self.location {
InitLocation::Argument(local) => mir.local_decls[local].source_info.span,
InitLocation::Statement(location) => mir.source_info(location).span,
}
impl<'a, 'gcx, 'tcx> MoveData<'tcx> {
- pub fn gather_moves(mir: &Mir<'tcx>, tcx: TyCtxt<'a, 'gcx, 'tcx>)
+ pub fn gather_moves(mir: &Body<'tcx>, tcx: TyCtxt<'a, 'gcx, 'tcx>)
-> Result<Self, (Self, Vec<(Place<'tcx>, MoveError<'tcx>)>)> {
builder::gather_moves(mir, tcx)
}