Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
macros
/
macro-2.rs
blob: f28a567cd4ebebb311e9b78ab437cbe96cf35586 [
file
] [
log
] [
blame
] [
edit
]
//@ run-pass
pub
fn
main
()
{
macro_rules
!
mylambda_tt
{
(
$x
:
ident
,
$body
:
expr
)
=>
({
fn
f
(
$x
:
isize
)
->
isize
{
return
$body
;
}
f
})
}
assert_eq
!(
mylambda_tt
!(
y
,
y
*
2
)(
8
),
16
);
}