Add a 'de lifetime to the deserialize traits

This commit is contained in:
David Tolnay
2017-03-26 22:56:58 -07:00
parent 59b3961ad4
commit d3a2f5e268
13 changed files with 640 additions and 563 deletions
+2 -22
View File
@@ -6,28 +6,8 @@ use internals::ast::Item;
use internals::attr;
macro_rules! path {
($first:ident $(:: $rest:ident)*) => {
syn::Path {
global: false,
segments: vec![
stringify!($first).into(),
$(
stringify!($rest).into(),
)*
],
}
};
(::$first:ident $(:: $rest:ident)*) => {
syn::Path {
global: true,
segments: vec![
stringify!($first).into(),
$(
stringify!($rest).into(),
)*
],
}
($($path:tt)+) => {
syn::parse_path(stringify!($($path)+)).unwrap()
};
}