Sign in
android
/
toolchain
/
rustc
/
43f0694b1feb1296004d84509e01177159e71be0
/
.
/
src
/
test
/
ui
/
block-arg-call-as.rs
blob: 87cf3a487bf433a635dd59f6503e37623cf596cb [
file
] [
log
] [
blame
]
// run-pass
#![
allow
(
non_snake_case
)]
fn
asBlock
<
F
>(
f
:
F
)
->
usize where F
:
FnOnce
()
->
usize
{
return
f
();
}
pub
fn
main
()
{
let
x
=
asBlock
(||
22
);
assert_eq
!(
x
,
22
);
}