blob: 8552c4b81633da6b4d263b7ae81391f16f0c7d83 (
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);
}
|