Sign in
fuchsia
/
third_party
/
rust
/
13ef05e2be9862ea7b94d0b42e0b2d044b3c7f6b
/
.
/
tests
/
ui
/
last-use-is-capture.rs
blob: 6e07895f1d301c5f08255d326c562fd0b2d61885 [
file
] [
log
] [
blame
]
//@ run-pass
#![
allow
(
dead_code
)]
// Make sure #1399 stays fixed
struct
A
{
a
:
Box
<
isize
>
}
pub
fn
main
()
{
fn
invoke
<
F
>(
f
:
F
)
where F
:
FnOnce
()
{
f
();
}
let
k
:
Box
<
_
>
=
22.into
();
let
_u
=
A
{
a
:
k
.
clone
()};
invoke
(||
println
!(
"{}"
,
k
.
clone
())
)
}