fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
2.0 KiB58 linesraw
1error[E0603]: tuple variant `Tuple` is private
2  --> $DIR/variant.rs:11:48
3   |
4LL |     let variant_tuple = NonExhaustiveVariants::Tuple(640);
5   |                                                ^^^^^
6   |
7   = note: a tuple variant constructor is private if any of its fields is private
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   |                                ^^^^^
26   |
27   = note: a tuple variant constructor is private if any of its fields is private
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   |                                   ^^^^^
34   |
35   = note: a tuple variant constructor is private if any of its fields is private
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
57Some errors have detailed explanations: E0603, E0638, E0639.
58For more information about an error, try `rustc --explain E0603`.