about summary refs log tree commit diff
path: root/tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-08-12 14:34:10 +0000
committerbors <bors@rust-lang.org>2024-08-12 14:34:10 +0000
commit0a336b3934913793639599ad80777881070c5d7f (patch)
treec8180aa9ba87625aeaf409552b040d86fdee878d /tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
parente66f3db9fa890fa6eb85ff5d55ff837455f81124 (diff)
parent3bb7f35ec4ec19b398abc66fe38e645b117195dc (diff)
downloadrust-0a336b3934913793639599ad80777881070c5d7f.tar.gz
rust-0a336b3934913793639599ad80777881070c5d7f.zip
Auto merge of #17865 - ShoyuVanilla:exhaust-block, r=Veykril
fix: Missing non-exhaustive let diagnostics inside async or unsafe block

The reason that this test doesn't have a pointer deref case is because the following code;
```rust
fn test(ptr: *const Result<i32, !>) {
    unsafe {
        let Ok(_x) = *ptr;
    }
}
```
is getting a block with no stmts but tail one in here(thus, no diagnostic error),
https://github.com/rust-lang/rust-analyzer/blob/0daeb5c0b05cfdf2101b0f078c27539099bf38e6/crates/hir-ty/src/diagnostics/expr.rs#L256-L257
while the following is getting a block with a single stmt without tail 🤔
```rust
fn test(x: Result<i32, &'static !>) {
    let Ok(_y) = x;
}
```
I'll make a more deep inspection and file this as a new issue

_Originally posted by `@ShoyuVanilla` in https://github.com/rust-lang/rust-analyzer/pull/17853#discussion_r1712993585_
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions