The Rust Programming Language Forum
Enumerations: how are they stored and other questions
help
tczajka
July 13, 2025, 5:46pm
31
Ideally it should be -∞:
2
-∞
= 0, log 0 = -∞
size of
(u32, Never)
would be 4 + (-∞) = -∞
Unfortunately -∞ doesn't fit in
usize
.
6 Likes
TWiR quote of the week
Why is `&Void` not an empty type when `Void` is?
show post in topic
Related topics
Topic
Replies
Views
Activity
Enum crimes - getting the discriminant
help
27
4642
April 24, 2023
Why doesn't the niche optimization work for this enum?
help
14
1576
May 17, 2021
Noob question again: enum and struct?
48
12222
June 17, 2024
Why is the discriminant of a `#[repr(u8)] enum` not `u8`?
help
17
7913
July 11, 2020
Inconsistencies in enum discriminants
19
715
March 16, 2023