diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-05-25 11:21:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-25 11:21:26 +0000 |
commit | 79d977e759b073a0a4d422b9a1032427ddc05295 (patch) | |
tree | 5241cceab618ab0bb6bfc00d344980f1aa87cf57 /gcc/rust/backend/rust-compile-expr.h | |
parent | d09b135116f2bd56fbab054a9a0122cc6b59e06e (diff) | |
parent | ec9a03a03b512e268dd31571df18e2c37e1ee372 (diff) | |
download | gcc-79d977e759b073a0a4d422b9a1032427ddc05295.zip gcc-79d977e759b073a0a4d422b9a1032427ddc05295.tar.gz gcc-79d977e759b073a0a4d422b9a1032427ddc05295.tar.bz2 |
Merge #1279
1279: Implement type checking for the `IfLet` expression. r=philberty a=antego
Addresses #1177.
This change implements the type check for the `IfLet` expression. This is the adapted type checking code from the `MatchExpr`.
Tested on this code
```
enum E {
X(u8),
}
fn main() -> i32 {
let mut res = 0;
let v = E::X(4);
if let E::X(n) = v {
res = n;
}
0
}
```
Compilation finishes without errors.
Next is the implementation of the code generation but I'll need help to find where it's located.
Co-authored-by: antego <antego@users.noreply.github.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.h')
0 files changed, 0 insertions, 0 deletions