fork/rust

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

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
1.8 KiB52 linesraw
1error[E0603]: tuple variant `Tuple` is private
2  --> $DIR/variant.rs:11:48
3   |
4LL |     let variant_tuple = NonExhaustiveVariants::Tuple(640);
5   |                                                ^^^^^
6
7error[E0603]: unit variant `Unit` is private
8  --> $DIR/variant.rs:14:47
9   |
10LL |     let variant_unit = NonExhaustiveVariants::Unit;
11   |                                               ^^^^
12
13error[E0603]: unit variant `Unit` is private
14  --> $DIR/variant.rs:18:32
15   |
16LL |         NonExhaustiveVariants::Unit => "",
17   |                                ^^^^
18
19error[E0603]: tuple variant `Tuple` is private
20  --> $DIR/variant.rs:20:32
21   |
22LL |         NonExhaustiveVariants::Tuple(fe_tpl) => "",
23   |                                ^^^^^
24
25error[E0603]: tuple variant `Tuple` is private
26  --> $DIR/variant.rs:26:35
27   |
28LL |     if let NonExhaustiveVariants::Tuple(fe_tpl) = variant_struct {
29   |                                   ^^^^^
30
31error[E0639]: cannot create non-exhaustive variant using struct expression
32  --> $DIR/variant.rs:8:26
33   |
34LL |     let variant_struct = NonExhaustiveVariants::Struct { field: 640 };
35   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36
37error[E0638]: `..` required with variant marked as non-exhaustive
38  --> $DIR/variant.rs:22:9
39   |
40LL |         NonExhaustiveVariants::Struct { field } => ""
41   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42
43error[E0638]: `..` required with variant marked as non-exhaustive
44  --> $DIR/variant.rs:30:12
45   |
46LL |     if let NonExhaustiveVariants::Struct { field } = variant_struct {
47   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48
49error: aborting due to 8 previous errors
50
51Some errors have detailed explanations: E0603, E0638, E0639.
52For more information about an error, try `rustc --explain E0603`.