about summary refs log tree commit diff
path: root/src/test/codegen
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-12-16 13:26:16 +0000
committerGitHub <noreply@github.com>2021-12-16 13:26:16 +0000
commitf79f3db7b71b192dd2e387d2d7face7e27b3b3bd (patch)
tree4b5a50adc20566bfbed300a8d4d4656d5159da1e /src/test/codegen
parent098b1f248682f87a69f6f00ff0683ca724521b5d (diff)
parentee079561b1d65d40f67a9d6c3df3e8022b2e3d0a (diff)
downloadrust-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