Skip to content

Commit b93ad2d

Browse files
committed
discriminant for C should fint in int/uint
1 parent fe885e3 commit b93ad2d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/discriminant.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ fn repr_c_negative() {
504504
#[derive_where(PartialEq, PartialOrd)]
505505
#[repr(C)]
506506
enum Test {
507-
A = -0x8000_0000_0000_0000_isize,
507+
A = (-0x8000_0000_i32) as isize,
508508
B,
509509
#[allow(dead_code)]
510510
#[derive_where(incomparable)]
@@ -533,7 +533,7 @@ fn repr_c_expr() {
533533
#[derive_where(PartialEq, PartialOrd)]
534534
#[repr(C)]
535535
enum Test {
536-
A = isize::MAX - 2,
536+
A = (u32::MAX - 2) as isize,
537537
B,
538538
#[allow(dead_code)]
539539
#[derive_where(incomparable)]

0 commit comments

Comments
 (0)