2019-03-22 11:19:12 -05:00
|
|
|
error[E0603]: tuple variant `Tuple` is private
|
|
|
|
--> $DIR/variant.rs:11:48
|
|
|
|
|
|
|
|
|
LL | let variant_tuple = NonExhaustiveVariants::Tuple(640);
|
2020-03-22 17:36:54 -05:00
|
|
|
| ^^^^^ private tuple variant
|
2020-01-12 07:04:03 -06:00
|
|
|
|
|
|
|
|
note: the tuple variant `Tuple` is defined here
|
|
|
|
--> $DIR/auxiliary/variants.rs:5:23
|
|
|
|
|
|
|
|
|
LL | #[non_exhaustive] Tuple(u32),
|
2022-07-04 04:13:16 -05:00
|
|
|
| ^^^^^
|
2019-03-22 11:19:12 -05:00
|
|
|
|
|
|
|
error[E0603]: unit variant `Unit` is private
|
|
|
|
--> $DIR/variant.rs:14:47
|
|
|
|
|
|
|
|
|
LL | let variant_unit = NonExhaustiveVariants::Unit;
|
2020-03-22 17:36:54 -05:00
|
|
|
| ^^^^ private unit variant
|
2020-01-12 07:04:03 -06:00
|
|
|
|
|
|
|
|
note: the unit variant `Unit` is defined here
|
|
|
|
--> $DIR/auxiliary/variants.rs:4:23
|
|
|
|
|
|
|
|
|
LL | #[non_exhaustive] Unit,
|
|
|
|
| ^^^^
|
2019-03-22 11:19:12 -05:00
|
|
|
|
|
|
|
error[E0603]: unit variant `Unit` is private
|
|
|
|
--> $DIR/variant.rs:18:32
|
|
|
|
|
|
|
|
|
LL | NonExhaustiveVariants::Unit => "",
|
2020-03-22 17:36:54 -05:00
|
|
|
| ^^^^ private unit variant
|
2020-01-12 07:04:03 -06:00
|
|
|
|
|
|
|
|
note: the unit variant `Unit` is defined here
|
|
|
|
--> $DIR/auxiliary/variants.rs:4:23
|
|
|
|
|
|
|
|
|
LL | #[non_exhaustive] Unit,
|
|
|
|
| ^^^^
|
2019-03-22 11:19:12 -05:00
|
|
|
|
|
|
|
error[E0603]: tuple variant `Tuple` is private
|
|
|
|
--> $DIR/variant.rs:20:32
|
|
|
|
|
|
|
|
|
LL | NonExhaustiveVariants::Tuple(fe_tpl) => "",
|
2020-03-22 17:36:54 -05:00
|
|
|
| ^^^^^ private tuple variant
|
2020-01-12 07:04:03 -06:00
|
|
|
|
|
|
|
|
note: the tuple variant `Tuple` is defined here
|
|
|
|
--> $DIR/auxiliary/variants.rs:5:23
|
|
|
|
|
|
|
|
|
LL | #[non_exhaustive] Tuple(u32),
|
2022-07-04 04:13:16 -05:00
|
|
|
| ^^^^^
|
2019-03-22 11:19:12 -05:00
|
|
|
|
|
|
|
error[E0603]: tuple variant `Tuple` is private
|
|
|
|
--> $DIR/variant.rs:26:35
|
|
|
|
|
|
|
|
|
LL | if let NonExhaustiveVariants::Tuple(fe_tpl) = variant_struct {
|
2020-03-22 17:36:54 -05:00
|
|
|
| ^^^^^ private tuple variant
|
2020-01-12 07:04:03 -06:00
|
|
|
|
|
|
|
|
note: the tuple variant `Tuple` is defined here
|
|
|
|
--> $DIR/auxiliary/variants.rs:5:23
|
|
|
|
|
|
|
|
|
LL | #[non_exhaustive] Tuple(u32),
|
2022-07-04 04:13:16 -05:00
|
|
|
| ^^^^^
|
2019-03-22 11:19:12 -05:00
|
|
|
|
|
|
|
error[E0639]: cannot create non-exhaustive variant using struct expression
|
|
|
|
--> $DIR/variant.rs:8:26
|
|
|
|
|
|
|
|
|
LL | let variant_struct = NonExhaustiveVariants::Struct { field: 640 };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0638]: `..` required with variant marked as non-exhaustive
|
|
|
|
--> $DIR/variant.rs:22:9
|
|
|
|
|
|
|
|
|
LL | NonExhaustiveVariants::Struct { field } => ""
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-03-25 02:35:17 -05:00
|
|
|
|
|
2020-03-25 20:29:42 -05:00
|
|
|
help: add `..` at the end of the field list to ignore all other fields
|
2020-03-25 02:35:17 -05:00
|
|
|
|
|
|
|
|
LL | NonExhaustiveVariants::Struct { field , .. } => ""
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~
|
2019-03-22 11:19:12 -05:00
|
|
|
|
|
|
|
error[E0638]: `..` required with variant marked as non-exhaustive
|
|
|
|
--> $DIR/variant.rs:30:12
|
|
|
|
|
|
|
|
|
LL | if let NonExhaustiveVariants::Struct { field } = variant_struct {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-03-25 02:35:17 -05:00
|
|
|
|
|
2020-03-25 20:29:42 -05:00
|
|
|
help: add `..` at the end of the field list to ignore all other fields
|
2020-03-25 02:35:17 -05:00
|
|
|
|
|
|
|
|
LL | if let NonExhaustiveVariants::Struct { field , .. } = variant_struct {
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~
|
2019-03-22 11:19:12 -05:00
|
|
|
|
|
|
|
error: aborting due to 8 previous errors
|
|
|
|
|
2019-04-17 12:26:38 -05:00
|
|
|
Some errors have detailed explanations: E0603, E0638, E0639.
|
2019-03-22 11:19:12 -05:00
|
|
|
For more information about an error, try `rustc --explain E0603`.
|