]> git.lizzy.rs Git - rust.git/blob - src/test/ui/macros/macro-lifetime.rs
Add 'compiler/rustc_codegen_gcc/' from commit 'afae271d5d3719eeb92c18bc004bb6d1965a5f3f'
[rust.git] / src / test / ui / macros / macro-lifetime.rs
1 // run-pass
2 macro_rules! foo {
3     ($l:lifetime) => {
4         fn f<$l>(arg: &$l str) -> &$l str {
5             arg
6         }
7     }
8 }
9
10 pub fn main() {
11     foo!('a);
12     let x: &'static str = f("hi");
13     assert_eq!("hi", x);
14 }