Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
expand comment in StorageLive
  • Loading branch information
RalfJung committed May 18, 2019
1 parent b8aa422 commit a226b53
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/librustc_mir/interpret/eval_context.rs
Expand Up @@ -613,7 +613,9 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'a, 'mir, 'tcx>> InterpretCx<'a, 'mir, 'tc
trace!("{:?} is now live", local);

let local_val = LocalValue::Uninitialized;
// StorageLive *always* kills the value that's currently stored
// StorageLive *always* kills the value that's currently stored.
// However, we do not error if the variable already is live;
// see <https://github.com/rust-lang/rust/issues/42371>.
Ok(mem::replace(&mut self.frame_mut().locals[local].value, local_val))
}

Expand Down

0 comments on commit a226b53

Please sign in to comment.