]> git.lizzy.rs Git - rust.git/blobdiff - library/core/tests/ptr.rs
add lib tests for vec::IntoIter alignment issues
[rust.git] / library / core / tests / ptr.rs
index 390148550a4b398d891d2db7110a6dc19b24e9b4..90bc83510803f2185d4f8a3ec83e19343cc5eda8 100644 (file)
@@ -677,7 +677,7 @@ fn align_offset_issue_103361() {
     #[cfg(target_pointer_width = "16")]
     const SIZE: usize = 1 << 13;
     struct HugeSize([u8; SIZE - 1]);
-    let _ = (SIZE as *const HugeSize).align_offset(SIZE);
+    let _ = ptr::invalid::<HugeSize>(SIZE).align_offset(SIZE);
 }
 
 #[test]