]> git.lizzy.rs Git - rust.git/blobdiff - library/core/src/str/validations.rs
Rollup merge of #100885 - mzohreva:mz/sgx-export-cancel-type, r=Mark-Simulacrum
[rust.git] / library / core / src / str / validations.rs
index 04bc665233e385dc859f466730c030cf9b64ac20..2acef432f2063a7978d7163f60e80a0b8f4d4460 100644 (file)
@@ -216,12 +216,12 @@ macro_rules! next {
                     // SAFETY: since `align - index` and `ascii_block_size` are
                     // multiples of `usize_bytes`, `block = ptr.add(index)` is
                     // always aligned with a `usize` so it's safe to dereference
-                    // both `block` and `block.offset(1)`.
+                    // both `block` and `block.add(1)`.
                     unsafe {
                         let block = ptr.add(index) as *const usize;
                         // break if there is a nonascii byte
                         let zu = contains_nonascii(*block);
-                        let zv = contains_nonascii(*block.offset(1));
+                        let zv = contains_nonascii(*block.add(1));
                         if zu || zv {
                             break;
                         }