rust/tests/ui/parser/anon-enums.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

69 lines
1.8 KiB
Plaintext
Raw Normal View History

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 `:`
--> $DIR/anon-enums.rs:13:11
|
LL | 42: i32 => (),
| ^ --- specifying the type of a pattern isn't supported
| |
| expected one of `...`, `..=`, `..`, or `|`
error: expected `|`, found `:`
--> $DIR/anon-enums.rs:14:10
|
LL | _: f64 => (),
| ^ --- specifying the type of a pattern isn't supported
| |
| expected `|`
error: expected one of `@` or `|`, found `:`
--> $DIR/anon-enums.rs:15:10
|
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 => (),
| ~~
error: aborting due to 6 previous errors