Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 #17853 (comment)
- Loading branch information