mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 16:08:05 +00:00
Collect lifetimes inside macro invocations
This commit is contained in:
@@ -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>),
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user