Closed
Description
auto-reduced (treereduce-rust):
fn main() {
if let &Some(Some(x)) = &Some(&mut Some(0)) {}
}
original:
fn main(e: &mut &&mut Foo) {
if let &Some(Some(x)) = &Some(&mut Some(0)) {
let _: &u32 = x;
}
if let Some(&x) = Some(&mut 0) {
let _: u32 = x;
}
}
Version information
rustc 1.86.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.86.0-dev
LLVM version: 19.1.7
Possibly related line of code:
rust/compiler/rustc_hir_typeck/src/pat.rs
Lines 423 to 435 in fdd1a3b