From 5b907ff7d4fe5b1d44fc8e8d08ad50e4c414be66 Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Mon, 21 Nov 2022 03:46:10 +0200 Subject: [PATCH] strict_provenance: use `ptr::invalid` in a test --- library/core/tests/ptr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/tests/ptr.rs b/library/core/tests/ptr.rs index 390148550a4b3..90bc83510803f 100644 --- a/library/core/tests/ptr.rs +++ b/library/core/tests/ptr.rs @@ -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::(SIZE).align_offset(SIZE); } #[test]