Skip to content

Commit b2ddd27

Browse files
committed
address nits
1 parent dc4b277 commit b2ddd27

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/librustc_mir/interpret/memory.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M> {
855855
return Ok(());
856856
}
857857
let ptr = ptr.to_ptr()?;
858+
// Check bounds, align and relocations on the edges
858859
self.get_bytes_with_undef_and_ptr(ptr, size, align)?;
859860
// Check undef, and maybe ptr
860861
self.check_defined(ptr, size)?;

src/librustc_mir/interpret/validity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
511511
// This is the size in bytes of the whole array.
512512
let size = Size::from_bytes(ty_size * len);
513513

514-
// In run-time mode, we accept points in here. This is actually more
514+
// In run-time mode, we accept pointers in here. This is actually more
515515
// permissive than a per-element check would be, e.g. we accept
516516
// an &[u8] that contains a pointer even though bytewise checking would
517517
// reject it. However, that's good: We don't inherently want

0 commit comments

Comments
 (0)