]> git.lizzy.rs Git - rust.git/blob - tests/ui/macros/macro-lifetime-used-with-bound.rs
Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726
[rust.git] / tests / 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 }