Closed naqunmiemie closed 1 year ago
Related: https://github.com/rust-lang/rust/issues/70844
Per Rust spec those IfLet blocks are statements, hence semicolons should be meaningless and unnecessary.
My understanding is that this is a longstanding bug in the rust compiler whereby "if let" is syntax sugar that gets unrolled into some code that itself is missing a semicolon.
I'm inclined to say that the formatting is correct and that the issue is upstream. Maybe someone can correct me on that, otherwise I'd suggest adding // prettier-ignore
above the if let
blocks
I noticed that the last expression needed a semicolon
When the code is formatted, it doesn't compile properly. This may be unreasonable.
Input code
Output code
Additional context