Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
macros
/
macro-lifetime-used-with-static.rs
blob: a1faa512514e0b92526afebc7e6da2b905b3b27e [
file
] [
log
] [
blame
] [
edit
]
//@ run-pass
macro_rules
!
foo
{
(
$l
:
lifetime
)
=>
{
fn
f
(
arg
:
&
$l str
)
->
&
$l str
{
arg
}
}
}
pub
fn
main
()
{
foo
!(
'
static
);
let
x
:
&
'
static
str
=
f
(
"hi"
);
assert_eq
!(
"hi"
,
x
);
}