Skip to content

Commit 38104ab

Browse files
committed
expand comment
1 parent 9954af4 commit 38104ab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustc_mir/interpret/memory.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,8 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> {
289289

290290
// Normalize to a `Pointer` if we definitely need one.
291291
let normalized = if size.bytes() == 0 {
292-
// Can be an integer, just take what we got.
292+
// Can be an integer, just take what we got. We do NOT `force_bits` here;
293+
// if this is already a `Pointer` we want to do the bounds checks!
293294
sptr
294295
} else {
295296
// A "real" access, we must get a pointer.

0 commit comments

Comments
 (0)