|
| 1 | +error: expected identifier, found keyword `if` |
| 2 | + --> $DIR/recover-parens-around-match-arm-head.rs:4:12 |
| 3 | + | |
| 4 | +LL | (0 if true) => { |
| 5 | + | ^^ expected identifier, found keyword |
| 6 | + |
| 7 | +error: expected one of `)`, `,`, `...`, `..=`, `..`, or `|`, found keyword `if` |
| 8 | + --> $DIR/recover-parens-around-match-arm-head.rs:4:12 |
| 9 | + | |
| 10 | +LL | (0 if true) => { |
| 11 | + | -^^ expected one of `)`, `,`, `...`, `..=`, `..`, or `|` |
| 12 | + | | |
| 13 | + | help: missing `,` |
| 14 | + |
| 15 | +error: expected one of `)`, `,`, `@`, or `|`, found keyword `true` |
| 16 | + --> $DIR/recover-parens-around-match-arm-head.rs:4:15 |
| 17 | + | |
| 18 | +LL | (0 if true) => { |
| 19 | + | -^^^^ expected one of `)`, `,`, `@`, or `|` |
| 20 | + | | |
| 21 | + | help: missing `,` |
| 22 | + |
| 23 | +error[E0308]: mismatched types |
| 24 | + --> $DIR/recover-parens-around-match-arm-head.rs:4:9 |
| 25 | + | |
| 26 | +LL | let x = match val { |
| 27 | + | --- this expression has type `{integer}` |
| 28 | +LL | (0 if true) => { |
| 29 | + | ^^^^^^^^^^^ expected integer, found `(_, _, _)` |
| 30 | + | |
| 31 | + = note: expected type `{integer}` |
| 32 | + found tuple `(_, _, _)` |
| 33 | + |
| 34 | +error[E0308]: mismatched types |
| 35 | + --> $DIR/recover-parens-around-match-arm-head.rs:13:19 |
| 36 | + | |
| 37 | +LL | let _y: u32 = x; |
| 38 | + | --- ^ expected `u32`, found `u8` |
| 39 | + | | |
| 40 | + | expected due to this |
| 41 | + | |
| 42 | +help: you can convert a `u8` to a `u32` |
| 43 | + | |
| 44 | +LL | let _y: u32 = x.into(); |
| 45 | + | +++++++ |
| 46 | + |
| 47 | +error: aborting due to 5 previous errors |
| 48 | + |
| 49 | +For more information about this error, try `rustc --explain E0308`. |
0 commit comments