about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_mir/interpret/memory.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_mir/interpret/memory.rs b/src/librustc_mir/interpret/memory.rs
index 8b72c367e9f..c3eec677a48 100644
--- a/src/librustc_mir/interpret/memory.rs
+++ b/src/librustc_mir/interpret/memory.rs
@@ -289,7 +289,8 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> {
 
         // Normalize to a `Pointer` if we definitely need one.
         let normalized = if size.bytes() == 0 {
-            // Can be an integer, just take what we got.
+            // Can be an integer, just take what we got.  We do NOT `force_bits` here;
+            // if this is already a `Pointer` we want to do the bounds checks!
             sptr
         } else {
             // A "real" access, we must get a pointer.