1 #![feature(non_exhaustive)]
4 * The initial implementation of #[non_exhaustive] (RFC 2008) does not include support for
5 * variants. See issue #44109 and PR 45394.
8 pub enum NonExhaustiveVariants {
9 #[non_exhaustive] Unit,
10 //~^ ERROR #[non_exhaustive] is not yet supported on variants
11 #[non_exhaustive] Tuple(u32),
12 //~^ ERROR #[non_exhaustive] is not yet supported on variants
13 #[non_exhaustive] Struct { field: u32 }
14 //~^ ERROR #[non_exhaustive] is not yet supported on variants