From 5dd5244423d36972ee95a236eea650ba3d74843a Mon Sep 17 00:00:00 2001 From: Ben Kimock Date: Tue, 7 Jun 2022 19:24:09 -0400 Subject: [PATCH] Use repr(C) when depending on struct layout in ptr tests --- library/core/tests/ptr.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/core/tests/ptr.rs b/library/core/tests/ptr.rs index 40b2b49bdbd7d..3e2956eac8753 100644 --- a/library/core/tests/ptr.rs +++ b/library/core/tests/ptr.rs @@ -19,6 +19,7 @@ fn test_const_from_raw_parts() { #[test] fn test() { unsafe { + #[repr(C)] struct Pair { fst: isize, snd: isize,