]> git.lizzy.rs Git - rust.git/blobdiff - library/core/tests/ptr.rs
Fix naming format of IEEE 754 standard
[rust.git] / library / core / tests / ptr.rs
index 12861794c2d2c248d50ebcbb41c9c6d3a749dbf3..97a369810056dceefcdef14ad542fe4a0e15fd93 100644 (file)
@@ -650,7 +650,7 @@ pub fn new<Value: std::marker::Unsize<T>>(value: Value) -> Self {
                     .unwrap_or_else(|| handle_alloc_error(layout))
                     .cast::<DynMetadata<T>>();
                 ptr.as_ptr().write(meta);
-                ptr.cast::<u8>().as_ptr().add(offset).cast::<Value>().write(value);
+                ptr.as_ptr().byte_add(offset).cast::<Value>().write(value);
                 Self { ptr, phantom: PhantomData }
             }
         }