Skip to content

Commit 5dd5244

Browse files
committed
Use repr(C) when depending on struct layout in ptr tests
1 parent 7fe2c4b commit 5dd5244

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/core/tests/ptr.rs

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ fn test_const_from_raw_parts() {
1919
#[test]
2020
fn test() {
2121
unsafe {
22+
#[repr(C)]
2223
struct Pair {
2324
fst: isize,
2425
snd: isize,

0 commit comments

Comments
 (0)