Collect lifetimes inside macro invocations

This commit is contained in:
Taiki Endo
2020-06-07 20:30:03 +09:00
parent 8084258a3e
commit a227a87865
2 changed files with 37 additions and 2 deletions
+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>),
}
}
//////////////////////////////////////////////////////////////////////////