Sign in
fuchsia
/
third_party
/
rust
/
a10a02bf5fd00e4b34f1856af17d058dd5ec06f0
/
.
/
src
/
test
/
ui
/
macros
/
macro-lifetime.rs
blob: 5931fe0090770a0cd4dc5b0ee6cd79d298113fbe [
file
] [
log
] [
blame
]
// run-pass
macro_rules
!
foo
{
(
$l
:
lifetime
)
=>
{
fn
f
<
$l
>(
arg
:
&
$l str
)
->
&
$l str
{
arg
}
}
}
pub
fn
main
()
{
foo
!(
'
a
);
let
x
:
&
'
static
str
=
f
(
"hi"
);
assert_eq
!(
"hi"
,
x
);
}