1#[inline]
2pub fn not_enum() -> ! {
3 panic!("Only enums can be ordinalized.")
4}
5
6#[inline]
7pub fn not_unit_variant() -> ! {
8 panic!("An ordinalized enum can only have unit variants.")
9}
10
11#[inline]
12pub fn no_variant() -> ! {
13 panic!("An ordinalized enum needs to have at least one variant.")
14}
15
16#[inline]
17pub fn unsupported_discriminant() -> ! {
18 panic!(
19 "The discriminant of a variant of an ordinalized enum needs to be a legal literal \
20 integer, a constant variable/function or a constant expression."
21 )
22}
23
24#[inline]
25pub fn constant_variable_on_non_determined_size_enum() -> ! {
26 panic!(
27 "The discriminant of a variant can be assigned not to a literal integer only when the \
28 ordinalized enum is using the `repr` attribute to determine it's size before compilation."
29 )
30}