2023-01-15 16:36:46 -06:00
|
|
|
error: anonymous enums are not supported
|
|
|
|
--> $DIR/anon-enums.rs:1:16
|
|
|
|
|
|
|
|
|
LL | fn foo(x: bool | i32) -> i32 | f64 {
|
|
|
|
| ---- ^ ---
|
|
|
|
|
|
|
|
|
= help: create a named `enum` and use it here instead:
|
|
|
|
enum Name {
|
|
|
|
Variant1(bool),
|
|
|
|
Variant2(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
error: anonymous enums are not supported
|
|
|
|
--> $DIR/anon-enums.rs:1:30
|
|
|
|
|
|
|
|
|
LL | fn foo(x: bool | i32) -> i32 | f64 {
|
|
|
|
| --- ^ ---
|
|
|
|
|
|
|
|
|
= help: create a named `enum` and use it here instead:
|
|
|
|
enum Name {
|
|
|
|
Variant1(i32),
|
|
|
|
Variant2(f64),
|
|
|
|
}
|
|
|
|
|
|
|
|
error: expected one of `@` or `|`, found `:`
|
|
|
|
--> $DIR/anon-enums.rs:5:10
|
|
|
|
|
|
|
|
|
LL | x: i32 => x,
|
|
|
|
| ^ --- specifying the type of a pattern isn't supported
|
|
|
|
| |
|
|
|
|
| expected one of `@` or `|`
|
|
|
|
|
|
|
|
|
help: maybe write a path separator here
|
|
|
|
|
|
|
|
|
LL | x::i32 => x,
|
|
|
|
| ~~
|
|
|
|
|
|
|
|
error: expected one of `...`, `..=`, `..`, or `|`, found `:`
|
2023-01-16 19:50:45 -06:00
|
|
|
--> $DIR/anon-enums.rs:13:11
|
2023-01-15 16:36:46 -06:00
|
|
|
|
|
|
|
|
LL | 42: i32 => (),
|
|
|
|
| ^ --- specifying the type of a pattern isn't supported
|
|
|
|
| |
|
|
|
|
| expected one of `...`, `..=`, `..`, or `|`
|
|
|
|
|
|
|
|
error: expected `|`, found `:`
|
2023-01-16 19:50:45 -06:00
|
|
|
--> $DIR/anon-enums.rs:14:10
|
2023-01-15 16:36:46 -06:00
|
|
|
|
|
|
|
|
LL | _: f64 => (),
|
|
|
|
| ^ --- specifying the type of a pattern isn't supported
|
|
|
|
| |
|
|
|
|
| expected `|`
|
|
|
|
|
|
|
|
error: expected one of `@` or `|`, found `:`
|
2023-01-16 19:50:45 -06:00
|
|
|
--> $DIR/anon-enums.rs:15:10
|
2023-01-15 16:36:46 -06:00
|
|
|
|
|
|
|
|
LL | x: i32 => (),
|
|
|
|
| ^ --- specifying the type of a pattern isn't supported
|
|
|
|
| |
|
|
|
|
| expected one of `@` or `|`
|
|
|
|
|
|
|
|
|
help: maybe write a path separator here
|
|
|
|
|
|
|
|
|
LL | x::i32 => (),
|
|
|
|
| ~~
|
|
|
|
|
2023-01-16 19:50:45 -06:00
|
|
|
error: aborting due to 6 previous errors
|
2023-01-15 16:36:46 -06:00
|
|
|
|