mirror of https://github.com/rust-lang/rust.git
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
|
@ -19,6 +19,7 @@ fn test_const_from_raw_parts() {
|
|||
#[test]
|
||||
fn test() {
|
||||
unsafe {
|
||||
#[repr(C)]
|
||||
struct Pair {
|
||||
fst: isize,
|
||||
snd: isize,
|
||||
|
|
Loading…
Reference in New Issue