]> git.proxmox.com Git - rustc.git/blame - src/test/ui/rfc-2008-non-exhaustive/variant.stderr
New upstream version 1.38.0+dfsg1
[rustc.git] / src / test / ui / rfc-2008-non-exhaustive / variant.stderr
CommitLineData
532ac7d7
XL
1error[E0603]: tuple variant `Tuple` is private
2 --> $DIR/variant.rs:11:48
3 |
4LL | let variant_tuple = NonExhaustiveVariants::Tuple(640);
5 | ^^^^^
416331ca
XL
6 |
7 = note: a tuple variant constructor is private if any of its fields is private
532ac7d7
XL
8
9error[E0603]: unit variant `Unit` is private
10 --> $DIR/variant.rs:14:47
11 |
12LL | let variant_unit = NonExhaustiveVariants::Unit;
13 | ^^^^
14
15error[E0603]: unit variant `Unit` is private
16 --> $DIR/variant.rs:18:32
17 |
18LL | NonExhaustiveVariants::Unit => "",
19 | ^^^^
20
21error[E0603]: tuple variant `Tuple` is private
22 --> $DIR/variant.rs:20:32
23 |
24LL | NonExhaustiveVariants::Tuple(fe_tpl) => "",
25 | ^^^^^
416331ca
XL
26 |
27 = note: a tuple variant constructor is private if any of its fields is private
532ac7d7
XL
28
29error[E0603]: tuple variant `Tuple` is private
30 --> $DIR/variant.rs:26:35
31 |
32LL | if let NonExhaustiveVariants::Tuple(fe_tpl) = variant_struct {
33 | ^^^^^
416331ca
XL
34 |
35 = note: a tuple variant constructor is private if any of its fields is private
532ac7d7
XL
36
37error[E0639]: cannot create non-exhaustive variant using struct expression
38 --> $DIR/variant.rs:8:26
39 |
40LL | let variant_struct = NonExhaustiveVariants::Struct { field: 640 };
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42
43error[E0638]: `..` required with variant marked as non-exhaustive
44 --> $DIR/variant.rs:22:9
45 |
46LL | NonExhaustiveVariants::Struct { field } => ""
47 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48
49error[E0638]: `..` required with variant marked as non-exhaustive
50 --> $DIR/variant.rs:30:12
51 |
52LL | if let NonExhaustiveVariants::Struct { field } = variant_struct {
53 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54
55error: aborting due to 8 previous errors
56
48663c56 57Some errors have detailed explanations: E0603, E0638, E0639.
532ac7d7 58For more information about an error, try `rustc --explain E0603`.