]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2008-non-exhaustive/variants_create.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / rfc-2008-non-exhaustive / variants_create.rs
1 #![feature(non_exhaustive)]
2
3 /*
4  * The initial implementation of #[non_exhaustive] (RFC 2008) does not include support for
5  * variants. See issue #44109 and PR 45394.
6  */
7
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
15 }
16
17 fn main() { }