blob: a1faa512514e0b92526afebc7e6da2b905b3b27e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
//@ 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);
}
|