]> git.lizzy.rs Git - rust.git/blob - src/test/ui/enum-discriminant/feature-gate-arbitrary_enum_discriminant.stderr
Rollup merge of #95376 - WaffleLapkin:drain_keep_rest, r=dtolnay
[rust.git] / src / test / ui / enum-discriminant / feature-gate-arbitrary_enum_discriminant.stderr
1 error[E0658]: discriminants on non-unit variants are experimental
2   --> $DIR/feature-gate-arbitrary_enum_discriminant.rs:6:13
3    |
4 LL |   Tuple() = 2,
5    |             ^
6    |
7    = note: see issue #60553 <https://github.com/rust-lang/rust/issues/60553> for more information
8    = help: add `#![feature(arbitrary_enum_discriminant)]` to the crate attributes to enable
9
10 error[E0658]: discriminants on non-unit variants are experimental
11   --> $DIR/feature-gate-arbitrary_enum_discriminant.rs:8:14
12    |
13 LL |   Struct{} = 3,
14    |              ^
15    |
16    = note: see issue #60553 <https://github.com/rust-lang/rust/issues/60553> for more information
17    = help: add `#![feature(arbitrary_enum_discriminant)]` to the crate attributes to enable
18
19 error[E0658]: custom discriminant values are not allowed in enums with tuple or struct variants
20   --> $DIR/feature-gate-arbitrary_enum_discriminant.rs:4:10
21    |
22 LL |   Unit = 1,
23    |          ^ disallowed custom discriminant
24 LL |
25 LL |   Tuple() = 2,
26    |   ----------- tuple variant defined here
27 LL |
28 LL |   Struct{} = 3,
29    |   ------------ struct variant defined here
30    |
31    = note: see issue #60553 <https://github.com/rust-lang/rust/issues/60553> for more information
32    = help: add `#![feature(arbitrary_enum_discriminant)]` to the crate attributes to enable
33
34 error: aborting due to 3 previous errors
35
36 For more information about this error, try `rustc --explain E0658`.