about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorA4-Tacks <wdsjxhno1001@163.com>2025-09-03 20:07:19 +0800
committerA4-Tacks <wdsjxhno1001@163.com>2025-09-25 21:04:48 +0800
commitc1cd1da668650d0e9e0f143f89a17387d96979c2 (patch)
tree859f6821381a7f8916e6073b47bd3d1a69ea824c /compiler/rustc_codegen_llvm/src/errors.rs
parentda9831cc04b85faf584318e79dea00b4aa16ec59 (diff)
downloadrust-c1cd1da668650d0e9e0f143f89a17387d96979c2.tar.gz
rust-c1cd1da668650d0e9e0f143f89a17387d96979c2.zip
Add let-chain support for convert_to_guarded_return
- And add early expression `None` in function `Option` return

Example
---
```rust
fn main() {
    if$0 let Ok(x) = Err(92)
        && x < 30
        && let Some(y) = Some(8)
    {
        foo(x, y);
    }
}
```
->
```rust
fn main() {
    let Ok(x) = Err(92) else { return };
    if x >= 30 {
        return;
    }
    let Some(y) = Some(8) else { return };
    foo(x, y);
}
```
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions