]> git.proxmox.com Git - rustc.git/blob - tests/ui/macros/macro-lifetime-used-with-static.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / macros / macro-lifetime-used-with-static.rs
1 // run-pass
2 macro_rules! foo {
3 ($l:lifetime) => {
4 fn f(arg: &$l str) -> &$l str {
5 arg
6 }
7 }
8 }
9
10 pub fn main() {
11 foo!('static);
12 let x: &'static str = f("hi");
13 assert_eq!("hi", x);
14 }