Skip to content

Conversation

@A4-Tacks
Copy link
Member

Example

Input:

#[repr(i64)]
enum TheEnum {
    Foo = 1 << 63,
    Bar,
    Baz$0 = 0x7fff_ffff_ffff_fffe,
    Quux,
}

Before this PR:

#[repr(i64)]
enum TheEnum {
    Foo = 1 << 63,
    Bar = -9223372036854775807,
    Baz = 0x7fff_ffff_ffff_fffe,
    Quux = 9223372036854775807,
}

After this PR:

#[repr(i64)]
enum TheEnum {
    Foo = 1 << 63,
    Bar = -9_223372_036854_775807,
    Baz = 0x7fff_ffff_ffff_fffe,
    Quux = 0x7fff_ffff_ffff_ffff,
}

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 28, 2025
@A4-Tacks A4-Tacks mentioned this pull request Nov 19, 2025
40 tasks
Example
---

**Input**:

```rust
#[repr(i64)]
enum TheEnum {
    Foo = 1 << 63,
    Bar,
    Baz$0 = 0x7fff_ffff_ffff_fffe,
    Quux,
}
```

**Before this PR**:

```rust
#[repr(i64)]
enum TheEnum {
    Foo = 1 << 63,
    Bar = -9223372036854775807,
    Baz = 0x7fff_ffff_ffff_fffe,
    Quux = 9223372036854775807,
}
```

**After this PR**:

```rust
#[repr(i64)]
enum TheEnum {
    Foo = 1 << 63,
    Bar = -9_223372_036854_775807,
    Baz = 0x7fff_ffff_ffff_fffe,
    Quux = 0x7fff_ffff_ffff_ffff,
}
```
@A4-Tacks A4-Tacks force-pushed the pretty-num-explicit-enum-disc branch from aedb0b5 to 8033dad Compare November 19, 2025 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants