rust/tests/ui/parser/issues/recover-ge-as-fat-arrow.stderr
Esteban Küber f830fe313b Detect more => typos
Handle and recover `match expr { pat >= { arm } }`.
2023-11-14 00:46:37 +00:00

26 lines
837 B
Plaintext

error: expected one of `...`, `..=`, `..`, `=>`, `if`, or `|`, found `>=`
--> $DIR/recover-ge-as-fat-arrow.rs:4:11
|
LL | 1 >= {}
| ^^
| |
| expected one of `...`, `..=`, `..`, `=>`, `if`, or `|`
| help: use a fat arrow to start a match arm: `=>`
error[E0308]: mismatched types
--> $DIR/recover-ge-as-fat-arrow.rs:5:29
|
LL | _ => { let _: u16 = 2u8; }
| --- ^^^ expected `u16`, found `u8`
| |
| expected due to this
|
help: change the type of the numeric literal from `u8` to `u16`
|
LL | _ => { let _: u16 = 2u16; }
| ~~~
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.