|
| 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 | +error[E0618]: expected function, found `Enum<()>` |
| 35 | + --> $DIR/issue-114701.rs:14:27 |
| 36 | + | |
| 37 | +LL | enum Enum<T> { , SVariant { v: T }, UVariant } |
| 38 | + | -------- `Enum::UVariant` defined here |
| 39 | +... |
| 40 | +LL | assert!(if let Enum::$variant::<()> $matcher = $expr () else { false }, |
| 41 | + | -------- call expression requires function |
| 42 | +... |
| 43 | +LL | is_variant!(UVariant, Enum::<()>::UVariant); |
| 44 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 45 | + |
| 46 | +error: aborting due to 3 previous errors |
| 47 | + |
| 48 | +For more information about this error, try `rustc --explain E0618`. |
0 commit comments