Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
11030: Add comma for "move if to guard" r=Veykril a=weirane As I mentioned in #11017, there is a little issue in the implementation for if branch. This code ```rust let y = match 92 { x => { if x == 0 {$0 false } } _ => true, }; ``` will be transformed to ```rust let y = match 92 { x if x == 0 => false _ => true, }; ``` a comma is missing after the false. I moved the fix from the code handling else branch to above. Co-authored-by: Wang Ruochen <wrc@ruo-chen.wang>
- Loading branch information
Showing
1 changed file
with
37 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters