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:
commit
1660b4b70c
1 changed files with 1 additions and 0 deletions
|
@ -19,6 +19,7 @@ fn test_const_from_raw_parts() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test() {
|
fn test() {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
#[repr(C)]
|
||||||
struct Pair {
|
struct Pair {
|
||||||
fst: isize,
|
fst: isize,
|
||||||
snd: isize,
|
snd: isize,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue