diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-06-08 07:37:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-08 07:37:33 +0200 |
| commit | 1660b4b70cfb43a03680f12d61dd89fb50e6a54e (patch) | |
| tree | 1194d032536b224c94e96ec5c8e593fde5ac8f75 | |
| parent | a90c5a3c699a10ed1f44a638fa18f6ddbc879d95 (diff) | |
| parent | 5dd5244423d36972ee95a236eea650ba3d74843a (diff) | |
| download | rust-1660b4b70cfb43a03680f12d61dd89fb50e6a54e.tar.gz rust-1660b4b70cfb43a03680f12d61dd89fb50e6a54e.zip | |
Rollup merge of #97851 - saethlin:use-repr-c, r=thomcc
Use repr(C) when depending on struct layout in ptr tests The test depends on the layout of this struct `Pair`, so it should use `repr(C)` instead of the default `repr(Rust)`.
| -rw-r--r-- | library/core/tests/ptr.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/library/core/tests/ptr.rs b/library/core/tests/ptr.rs index 40b2b49bdbd..3e2956eac87 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, |
