Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
lint
/
unused-braces-while-let-with-mutable-value.rs
blob: 44a5f4fb44e65d1c29502958f457ddd64798112e [
file
] [
log
] [
blame
] [
edit
]
//@ 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
;
}
}