rust/tests/ui/for-loop-while/while-let-scope.rs
2025-11-28 21:41:03 +09:00

9 lines
155 B
Rust

//@ check-pass
// regression test for #40235
#![allow(unused_variables)]
fn foo() {}
fn main() {
while let Some(foo) = Some(1) { break }
foo();
}