]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/anon-enums.stderr
Auto merge of #105650 - cassaundra:float-literal-suggestion, r=pnkfelix
[rust.git] / tests / ui / parser / anon-enums.stderr
1 error: anonymous enums are not supported
2   --> $DIR/anon-enums.rs:1:16
3    |
4 LL | fn foo(x: bool | i32) -> i32 | f64 {
5    |           ---- ^ ---
6    |
7    = help: create a named `enum` and use it here instead:
8            enum Name {
9                Variant1(bool),
10                Variant2(i32),
11            }
12
13 error: anonymous enums are not supported
14   --> $DIR/anon-enums.rs:1:30
15    |
16 LL | fn foo(x: bool | i32) -> i32 | f64 {
17    |                          --- ^ ---
18    |
19    = help: create a named `enum` and use it here instead:
20            enum Name {
21                Variant1(i32),
22                Variant2(f64),
23            }
24
25 error: expected one of `@` or `|`, found `:`
26   --> $DIR/anon-enums.rs:5:10
27    |
28 LL |         x: i32 => x,
29    |          ^ --- specifying the type of a pattern isn't supported
30    |          |
31    |          expected one of `@` or `|`
32    |
33 help: maybe write a path separator here
34    |
35 LL |         x::i32 => x,
36    |          ~~
37
38 error: expected one of `...`, `..=`, `..`, or `|`, found `:`
39   --> $DIR/anon-enums.rs:13:11
40    |
41 LL |         42: i32 => (),
42    |           ^ --- specifying the type of a pattern isn't supported
43    |           |
44    |           expected one of `...`, `..=`, `..`, or `|`
45
46 error: expected `|`, found `:`
47   --> $DIR/anon-enums.rs:14:10
48    |
49 LL |         _: f64 => (),
50    |          ^ --- specifying the type of a pattern isn't supported
51    |          |
52    |          expected `|`
53
54 error: expected one of `@` or `|`, found `:`
55   --> $DIR/anon-enums.rs:15:10
56    |
57 LL |         x: i32 => (),
58    |          ^ --- specifying the type of a pattern isn't supported
59    |          |
60    |          expected one of `@` or `|`
61    |
62 help: maybe write a path separator here
63    |
64 LL |         x::i32 => (),
65    |          ~~
66
67 error: aborting due to 6 previous errors
68