82 lines
2.2 KiB
Plaintext
82 lines
2.2 KiB
Plaintext
|
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:14:11
|
||
|
|
|
||
|
LL | 42: i32 => (),
|
||
|
| ^ --- specifying the type of a pattern isn't supported
|
||
|
| |
|
||
|
| expected one of `...`, `..=`, `..`, or `|`
|
||
|
|
||
|
error: expected `|`, found `:`
|
||
|
--> $DIR/anon-enums.rs:15:10
|
||
|
|
|
||
|
LL | _: f64 => (),
|
||
|
| ^ --- specifying the type of a pattern isn't supported
|
||
|
| |
|
||
|
| expected `|`
|
||
|
|
||
|
error: expected one of `@` or `|`, found `:`
|
||
|
--> $DIR/anon-enums.rs:16: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[E0433]: failed to resolve: use of undeclared crate or module `x`
|
||
|
--> $DIR/anon-enums.rs:5:9
|
||
|
|
|
||
|
LL | x: i32 => x,
|
||
|
| ^ use of undeclared crate or module `x`
|
||
|
|
||
|
error[E0433]: failed to resolve: use of undeclared crate or module `x`
|
||
|
--> $DIR/anon-enums.rs:16:9
|
||
|
|
|
||
|
LL | x: i32 => (),
|
||
|
| ^ use of undeclared crate or module `x`
|
||
|
|
||
|
error: aborting due to 8 previous errors
|
||
|
|
||
|
For more information about this error, try `rustc --explain E0433`.
|