mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update syn and related dependencies
This commit is contained in:
parent
e4c80d0a88
commit
e94de4e1bd
22 changed files with 215 additions and 226 deletions
|
@ -10,7 +10,7 @@
|
|||
|
||||
//! A crate for deriving the MallocSizeOf trait.
|
||||
|
||||
extern crate quote;
|
||||
extern crate proc_macro2;
|
||||
#[macro_use]
|
||||
extern crate syn;
|
||||
#[macro_use]
|
||||
|
@ -19,7 +19,7 @@ extern crate synstructure;
|
|||
#[cfg(not(test))]
|
||||
decl_derive!([MallocSizeOf, attributes(ignore_malloc_size_of)] => malloc_size_of_derive);
|
||||
|
||||
fn malloc_size_of_derive(s: synstructure::Structure) -> quote::Tokens {
|
||||
fn malloc_size_of_derive(s: synstructure::Structure) -> proc_macro2::TokenStream {
|
||||
let match_body = s.each(|binding| {
|
||||
let ignore = binding
|
||||
.ast()
|
||||
|
@ -61,7 +61,7 @@ fn malloc_size_of_derive(s: synstructure::Structure) -> quote::Tokens {
|
|||
let (impl_generics, ty_generics, where_clause) = ast.generics.split_for_impl();
|
||||
let mut where_clause = where_clause.unwrap_or(&parse_quote!(where)).clone();
|
||||
for param in ast.generics.type_params() {
|
||||
let ident = param.ident;
|
||||
let ident = ¶m.ident;
|
||||
where_clause
|
||||
.predicates
|
||||
.push(parse_quote!(#ident: ::malloc_size_of::MallocSizeOf));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue