mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-01 04:27:38 +00:00
13 lines
221 B
Rust
13 lines
221 B
Rust
![]() |
// check-pass
|
||
|
|
||
|
#![deny(unused_braces)]
|
||
|
|
||
|
fn main() {
|
||
|
let mut a = Some(3);
|
||
|
// Shouldn't warn below `a`.
|
||
|
while let Some(ref mut v) = {a} {
|
||
|
a.as_mut().map(|a| std::mem::swap(a, v));
|
||
|
break;
|
||
|
}
|
||
|
}
|