Sign in
fuchsia
/
third_party
/
rust
/
9ae1a664f7b947dadb9e97eea7703831d9cd5d31
/
.
/
src
/
test
/
ui
/
macros
/
macro-lifetime-used-with-static.rs
blob: 8552c4b81633da6b4d263b7ae81391f16f0c7d83 [
file
] [
log
] [
blame
]
// 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
);
}