diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-12-16 13:26:16 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-16 13:26:16 +0000 |
| commit | f79f3db7b71b192dd2e387d2d7face7e27b3b3bd (patch) | |
| tree | 4b5a50adc20566bfbed300a8d4d4656d5159da1e /src/test/codegen | |
| parent | 098b1f248682f87a69f6f00ff0683ca724521b5d (diff) | |
| parent | ee079561b1d65d40f67a9d6c3df3e8022b2e3d0a (diff) | |
| download | rust-f79f3db7b71b192dd2e387d2d7face7e27b3b3bd.tar.gz rust-f79f3db7b71b192dd2e387d2d7face7e27b3b3bd.zip | |
Merge #11030
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>
Diffstat (limited to 'src/test/codegen')
0 files changed, 0 insertions, 0 deletions
