mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
16 lines
306 B
Rust
16 lines
306 B
Rust
// run-pass
|
|
#![allow(unused_variables)]
|
|
macro_rules! foo {
|
|
($l:lifetime, $l2:lifetime) => {
|
|
fn f<$l: $l2, $l2>(arg: &$l str, arg2: &$l2 str) -> &$l str {
|
|
arg
|
|
}
|
|
}
|
|
}
|
|
|
|
pub fn main() {
|
|
foo!('a, 'b);
|
|
let x: &'static str = f("hi", "there");
|
|
assert_eq!("hi", x);
|
|
}
|