Collect lifetimes inside macro invocations

This commit is contained in:
Taiki Endo committed 2020-10-24 05:29:47 +09:00
1 parent 8084258a3e
commit a227a87865
2 files changed
+37 -2

No files matched your search

+12
View File
@@ -723,6 +723,18 @@ fn test_gen() {
}
deriving!(&'a str);
macro_rules! mac {
($($tt:tt)*) => {
$($tt)*
};
}
#[derive(Deserialize)]
struct BorrowLifetimeInsideMacro<'a> {
#[serde(borrow = "'a")]
f: mac!(Cow<'a, str>),
}
}
//////////////////////////////////////////////////////////////////////////