|
1 | | -error: expected identifier, found `,` |
2 | | - --> $DIR/issue-114701.rs:1:16 |
3 | | - | |
4 | | -LL | enum Enum<T> { , SVariant { v: T }, UVariant } |
5 | | - | ^ |
6 | | - | | |
7 | | - | expected identifier |
8 | | - | help: remove this comma |
9 | | - |
10 | | -error: this `if` expression is missing a block after the condition |
11 | | - --> $DIR/issue-114701.rs:8:17 |
12 | | - | |
13 | | -LL | assert!(if let Enum::$variant::<()> $matcher = $expr () else { false }, |
14 | | - | ^^ |
15 | | -... |
16 | | -LL | is_variant!(UVariant, Enum::<()>::UVariant); |
17 | | - | ------------------------------------------- in this macro invocation |
18 | | - | |
19 | | -help: add a block here |
20 | | - --> $DIR/issue-114701.rs:8:64 |
21 | | - | |
22 | | -LL | assert!(if let Enum::$variant::<()> $matcher = $expr () else { false }, |
23 | | - | ^ |
24 | | -... |
25 | | -LL | is_variant!(UVariant, Enum::<()>::UVariant); |
26 | | - | ------------------------------------------- in this macro invocation |
27 | | - = note: this error originates in the macro `is_variant` (in Nightly builds, run with -Z macro-backtrace for more info) |
28 | | -help: remove the `if` if you meant to write a `let...else` statement |
29 | | - | |
30 | | -LL - assert!(if let Enum::$variant::<()> $matcher = $expr () else { false }, |
31 | | -LL + assert!(let Enum::$variant::<()> $matcher = $expr () else { false }, |
32 | | - | |
33 | | - |
34 | 1 | error[E0618]: expected function, found `Enum<()>` |
35 | 2 | --> $DIR/issue-114701.rs:14:27 |
36 | 3 | | |
37 | | -LL | enum Enum<T> { , SVariant { v: T }, UVariant } |
38 | | - | -------- `Enum::UVariant` defined here |
| 4 | +LL | enum Enum<T> { SVariant { v: T }, UVariant } |
| 5 | + | -------- `Enum::UVariant` defined here |
39 | 6 | ... |
40 | | -LL | assert!(if let Enum::$variant::<()> $matcher = $expr () else { false }, |
| 7 | +LL | assert!(if let Enum::$variant::<()> $matcher = $expr () { true } else { false }, |
41 | 8 | | -------- call expression requires function |
42 | 9 | ... |
43 | 10 | LL | is_variant!(UVariant, Enum::<()>::UVariant); |
44 | 11 | | ^^^^^^^^^^^^^^^^^^^^ |
45 | 12 |
|
46 | | -error: aborting due to 3 previous errors |
| 13 | +error: aborting due to previous error |
47 | 14 |
|
48 | 15 | For more information about this error, try `rustc --explain E0618`. |
0 commit comments