Skip to content

Commit 2bb28c1

Browse files
committed
avoid non-strict-provenance casts in libcore tests
1 parent 2ed65da commit 2bb28c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/tests/ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ fn align_offset_issue_103361() {
677677
#[cfg(target_pointer_width = "16")]
678678
const SIZE: usize = 1 << 13;
679679
struct HugeSize([u8; SIZE - 1]);
680-
let _ = (SIZE as *const HugeSize).align_offset(SIZE);
680+
let _ = ptr::invalid::<HugeSize>(SIZE).align_offset(SIZE);
681681
}
682682

683683
#[test]

0 commit comments

Comments
 (0)