macro_rules: NtLifetime cannot start with an identifier

This commit is contained in:
Vadim Petrochenkov 2020-04-04 16:23:43 +03:00
parent 49dc2f9f09
commit 106b30e869
2 changed files with 14 additions and 1 deletions

View file

@ -0,0 +1,13 @@
// check-pass
macro_rules! foo {
($(: $p:path)? $(: $l:lifetime)? ) => { bar! {$(: $p)? $(: $l)? } };
}
macro_rules! bar {
($(: $p:path)? $(: $l:lifetime)? ) => {};
}
foo! {: 'a }
fn main() {}