tidy, oh tidy

This commit is contained in:
Ralf Jung 2018-09-22 13:36:46 +02:00
parent 4e9f9329e3
commit f3a39e38f6
2 changed files with 16 additions and 4 deletions

View File

@ -230,7 +230,10 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tc
/// Mark a storage as live, killing the previous content and returning it.
/// Remember to deallocate that!
pub fn storage_live(&mut self, local: mir::Local) -> EvalResult<'tcx, LocalValue<M::PointerTag>> {
pub fn storage_live(
&mut self,
local: mir::Local
) -> EvalResult<'tcx, LocalValue<M::PointerTag>> {
assert!(local != mir::RETURN_PLACE, "Cannot make return place live");
trace!("{:?} is now live", local);
@ -519,7 +522,10 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tc
Ok(())
}
pub(super) fn deallocate_local(&mut self, local: LocalValue<M::PointerTag>) -> EvalResult<'tcx> {
pub(super) fn deallocate_local(
&mut self,
local: LocalValue<M::PointerTag>,
) -> EvalResult<'tcx> {
// FIXME: should we tell the user that there was a local which was never written to?
if let LocalValue::Live(Operand::Indirect(MemPlace { ptr, .. })) = local {
trace!("deallocating local");

View File

@ -557,7 +557,10 @@ impl
/// Compute a place. You should only use this if you intend to write into this
/// place; for reading, a more efficient alternative is `eval_place_for_read`.
pub fn eval_place(&mut self, mir_place: &mir::Place<'tcx>) -> EvalResult<'tcx, PlaceTy<'tcx, M::PointerTag>> {
pub fn eval_place(
&mut self,
mir_place: &mir::Place<'tcx>
) -> EvalResult<'tcx, PlaceTy<'tcx, M::PointerTag>> {
use rustc::mir::Place::*;
let place = match *mir_place {
Local(mir::RETURN_PLACE) => PlaceTy {
@ -805,7 +808,10 @@ impl
/// Every place can be read from, so we can turm them into an operand
#[inline(always)]
pub fn place_to_op(&self, place: PlaceTy<'tcx, M::PointerTag>) -> EvalResult<'tcx, OpTy<'tcx, M::PointerTag>> {
pub fn place_to_op(
&self,
place: PlaceTy<'tcx, M::PointerTag>
) -> EvalResult<'tcx, OpTy<'tcx, M::PointerTag>> {
let op = match place.place {
Place::Ptr(mplace) => {
Operand::Indirect(mplace)