]> git.lizzy.rs Git - rust.git/commitdiff
address nits
authorRalf Jung <post@ralfj.de>
Thu, 11 Oct 2018 11:13:14 +0000 (13:13 +0200)
committerRalf Jung <post@ralfj.de>
Sat, 13 Oct 2018 07:09:03 +0000 (09:09 +0200)
src/librustc_mir/interpret/memory.rs
src/librustc_mir/interpret/validity.rs

index 781673a9914720274c23cb2e23b4afd0e3aa0d5d..222bef4ff136bc3cdb39b455d8e907767bf88c8c 100644 (file)
@@ -855,6 +855,7 @@ pub fn check_bytes(
             return Ok(());
         }
         let ptr = ptr.to_ptr()?;
+        // Check bounds, align and relocations on the edges
         self.get_bytes_with_undef_and_ptr(ptr, size, align)?;
         // Check undef, and maybe ptr
         self.check_defined(ptr, size)?;
index 2c5a3a1812820acf01edada3b487e4f6e7348f02..aadb5cc871e1a85bfbfd423d4b6cdfd869f16f27 100644 (file)
@@ -511,7 +511,7 @@ pub fn validate_operand(
                         // This is the size in bytes of the whole array.
                         let size = Size::from_bytes(ty_size * len);
 
-                        // In run-time mode, we accept points in here.  This is actually more
+                        // In run-time mode, we accept pointers in here.  This is actually more
                         // permissive than a per-element check would be, e.g. we accept
                         // an &[u8] that contains a pointer even though bytewise checking would
                         // reject it.  However, that's good: We don't inherently want