Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
666 B
Rust
Raw Normal View History

2017-11-03 19:15:15 +00:00
#![crate_type = "rlib"]
#[non_exhaustive]
pub enum NonExhaustiveEnum {
Unit,
Tuple(u32),
Struct { field: u32 },
}
#[non_exhaustive]
pub enum NestedNonExhaustive {
A(NonExhaustiveEnum),
B,
C,
2017-11-03 19:15:15 +00:00
}
2019-11-30 15:51:26 +00:00
#[non_exhaustive]
pub enum EmptyNonExhaustiveEnum {}
pub enum VariantNonExhaustive {
#[non_exhaustive]
Bar {
x: u32,
y: u64,
},
Baz(u32, u16),
}
#[non_exhaustive]
pub enum NonExhaustiveSingleVariant {
A(bool),
}
2021-11-26 19:27:40 -08:00
#[repr(u8)]
pub enum FieldLessWithNonExhaustiveVariant {
A,
B,
#[non_exhaustive]
C,
}
impl Default for FieldLessWithNonExhaustiveVariant {
fn default() -> Self { Self::A }
}