]> git.lizzy.rs Git - rust.git/blob - src/test/ui/macros/macro-lifetime-used-with-bound.rs
Merge commit 'f51aade56f93175dde89177a92e3669ebd8e7592' into clippyup
[rust.git] / src / test / ui / macros / macro-lifetime-used-with-bound.rs
1 // run-pass
2 #![allow(unused_variables)]
3 macro_rules! foo {
4     ($l:lifetime, $l2:lifetime) => {
5         fn f<$l: $l2, $l2>(arg: &$l str, arg2: &$l2 str) -> &$l str {
6             arg
7         }
8     }
9 }
10
11 pub fn main() {
12     foo!('a, 'b);
13     let x: &'static str = f("hi", "there");
14     assert_eq!("hi", x);
15 }