// error: can't move out of borrowed content
ty::TyRef(..) | ty::TyRawPtr(..) => return Err(MovePathError::IllegalMove),
// error: can't move out of struct with destructor
- ty::TyAdt(adt, _) if adt.has_dtor() && !adt.is_box() =>
+ ty::TyAdt(adt, _) if adt.has_dtor(self.tcx) && !adt.is_box() =>
return Err(MovePathError::IllegalMove),
// move out of union - always move the entire union
ty::TyAdt(adt, _) if adt.is_union() =>
span_bug!(stmt.source_info.span,
"SetDiscriminant should not exist during borrowck");
}
+ StatementKind::InlineAsm { .. } |
StatementKind::Nop => {}
}
}
}
}
Rvalue::Ref(..) |
- Rvalue::Len(..) |
- Rvalue::InlineAsm { .. } => {}
+ Rvalue::Discriminant(..) |
+ Rvalue::Len(..) => {}
Rvalue::Box(..) => {
// This returns an rvalue with uninitialized contents. We can't
// move out of it here because it is an rvalue - assignments always
self.gather_move(loc, &Lvalue::Local(RETURN_POINTER));
}
- TerminatorKind::If { .. } |
TerminatorKind::Assert { .. } |
- TerminatorKind::SwitchInt { .. } |
- TerminatorKind::Switch { .. } => {
+ TerminatorKind::SwitchInt { .. } => {
// branching terminators - these don't move anything
}