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)`.
This commit is contained in:
Dylan DPC 2022-06-08 07:37:33 +02:00 committed by GitHub
commit 1660b4b70c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -19,6 +19,7 @@ fn test_const_from_raw_parts() {
#[test]
fn test() {
unsafe {
#[repr(C)]
struct Pair {
fst: isize,
snd: isize,