Skip to content

Commit 3a24958

Browse files
committed
Auto merge of #1809 - RalfJung:rustup, r=RalfJung
rustup
2 parents b0e5d5f + c151af5 commit 3a24958

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3e827cc21e0734edd26170e8d1481f0d66a1426b
1+
35bab923c8e5a1e8291735e7630539002eb80d7b

src/machine.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -508,14 +508,14 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
508508
#[inline(always)]
509509
fn memory_read(
510510
_memory_extra: &Self::MemoryExtra,
511-
alloc: &Allocation<Tag, AllocExtra>,
511+
alloc_extra: &AllocExtra,
512512
ptr: Pointer<Tag>,
513513
size: Size,
514514
) -> InterpResult<'tcx> {
515-
if let Some(data_race) = &alloc.extra.data_race {
515+
if let Some(data_race) = &alloc_extra.data_race {
516516
data_race.read(ptr, size)?;
517517
}
518-
if let Some(stacked_borrows) = &alloc.extra.stacked_borrows {
518+
if let Some(stacked_borrows) = &alloc_extra.stacked_borrows {
519519
stacked_borrows.memory_read(ptr, size)
520520
} else {
521521
Ok(())
@@ -525,14 +525,14 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
525525
#[inline(always)]
526526
fn memory_written(
527527
_memory_extra: &mut Self::MemoryExtra,
528-
alloc: &mut Allocation<Tag, AllocExtra>,
528+
alloc_extra: &mut AllocExtra,
529529
ptr: Pointer<Tag>,
530530
size: Size,
531531
) -> InterpResult<'tcx> {
532-
if let Some(data_race) = &mut alloc.extra.data_race {
532+
if let Some(data_race) = &mut alloc_extra.data_race {
533533
data_race.write(ptr, size)?;
534534
}
535-
if let Some(stacked_borrows) = &mut alloc.extra.stacked_borrows {
535+
if let Some(stacked_borrows) = &mut alloc_extra.stacked_borrows {
536536
stacked_borrows.memory_written(ptr, size)
537537
} else {
538538
Ok(())
@@ -542,17 +542,17 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
542542
#[inline(always)]
543543
fn memory_deallocated(
544544
memory_extra: &mut Self::MemoryExtra,
545-
alloc: &mut Allocation<Tag, AllocExtra>,
545+
alloc_extra: &mut AllocExtra,
546546
ptr: Pointer<Tag>,
547+
size: Size,
547548
) -> InterpResult<'tcx> {
548-
let size = alloc.size();
549549
if Some(ptr.alloc_id) == memory_extra.tracked_alloc_id {
550550
register_diagnostic(NonHaltingDiagnostic::FreedAlloc(ptr.alloc_id));
551551
}
552-
if let Some(data_race) = &mut alloc.extra.data_race {
552+
if let Some(data_race) = &mut alloc_extra.data_race {
553553
data_race.deallocate(ptr, size)?;
554554
}
555-
if let Some(stacked_borrows) = &mut alloc.extra.stacked_borrows {
555+
if let Some(stacked_borrows) = &mut alloc_extra.stacked_borrows {
556556
stacked_borrows.memory_deallocated(ptr, size)
557557
} else {
558558
Ok(())

0 commit comments

Comments
 (0)