Sign in
android
/
toolchain
/
rustc
/
d720b3f2ba07cb42ff7b311589c99daefe3aaa22
/
.
/
tests
/
ui
/
higher-rank-trait-bounds
/
hrtb-unboxed-closure-trait.rs
blob: a4a8a5ac6ccbc42c127e2e631ca1747b4e051d39 [
file
] [
log
] [
blame
]
// run-pass
// Test HRTB used with the `Fn` trait.
fn
foo
<
F
:
Fn
(&
isize
)>(
f
:
F
)
{
let
x
=
22
;
f
(&
x
);
}
fn
main
()
{
foo
(|
x
:
&
isize
|
println
!(
"{}"
,
*
x
));
}