mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-02 06:28:20 +03:00
Add comment
This commit is contained in:
@@ -401,6 +401,7 @@ fn last_error_place(&mut self) -> InterpResult<'tcx, MPlaceTy<'tcx, Tag>> {
|
||||
if let Some(errno_place) = this.active_thread_ref().last_error {
|
||||
Ok(errno_place)
|
||||
} else {
|
||||
// Allocate new place, set initial value to 0.
|
||||
let errno_layout = this.machine.layouts.u32;
|
||||
let errno_place = this.allocate(errno_layout, MiriMemoryKind::Machine.into());
|
||||
this.write_scalar(Scalar::from_u32(0), errno_place.into())?;
|
||||
|
||||
Reference in New Issue
Block a user