mirror of
https://github.com/servo/servo.git
synced 2025-08-16 19:05:33 +01:00
Bump all in-tree components to syn 1
This commit is contained in:
parent
2d823d7721
commit
99ef7813f2
15 changed files with 94 additions and 86 deletions
|
@ -10,9 +10,9 @@ path = "lib.rs"
|
|||
proc-macro = true
|
||||
|
||||
[dependencies]
|
||||
darling = "0.9"
|
||||
darling = { version = "0.10", default-features = false }
|
||||
derive_common = { path = "../derive_common" }
|
||||
proc-macro2 = "0.4"
|
||||
quote = "0.6"
|
||||
syn = { version = "0.15", default-features = false, features = ["clone-impls", "derive", "parsing"] }
|
||||
synstructure = "0.10"
|
||||
proc-macro2 = "1"
|
||||
quote = "1"
|
||||
syn = { version = "1", default-features = false, features = ["clone-impls", "derive", "parsing"] }
|
||||
synstructure = "0.12"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use darling::util::IdentList;
|
||||
use darling::util::PathList;
|
||||
use derive_common::cg;
|
||||
use proc_macro2::TokenStream;
|
||||
use quote::TokenStreamExt;
|
||||
|
@ -14,7 +14,7 @@ pub fn derive(mut input: DeriveInput) -> TokenStream {
|
|||
let no_bound = animation_input_attrs.no_bound.unwrap_or_default();
|
||||
let mut where_clause = input.generics.where_clause.take();
|
||||
for param in input.generics.type_params() {
|
||||
if !no_bound.contains(¶m.ident) {
|
||||
if !no_bound.iter().any(|name| name.is_ident(¶m.ident)) {
|
||||
cg::add_predicate(
|
||||
&mut where_clause,
|
||||
parse_quote!(#param: crate::values::animated::Animate),
|
||||
|
@ -124,7 +124,7 @@ struct AnimateInputAttrs {
|
|||
#[darling(attributes(animation), default)]
|
||||
#[derive(Default, FromDeriveInput)]
|
||||
pub struct AnimationInputAttrs {
|
||||
pub no_bound: Option<IdentList>,
|
||||
pub no_bound: Option<PathList>,
|
||||
}
|
||||
|
||||
#[darling(attributes(animation), default)]
|
||||
|
@ -133,7 +133,7 @@ pub struct AnimationVariantAttrs {
|
|||
pub error: bool,
|
||||
// Only here because of structs, where the struct definition acts as a
|
||||
// variant itself.
|
||||
pub no_bound: Option<IdentList>,
|
||||
pub no_bound: Option<PathList>,
|
||||
}
|
||||
|
||||
#[darling(attributes(animation), default)]
|
||||
|
|
|
@ -14,7 +14,7 @@ pub fn derive(mut input: DeriveInput) -> TokenStream {
|
|||
let no_bound = animation_input_attrs.no_bound.unwrap_or_default();
|
||||
let mut where_clause = input.generics.where_clause.take();
|
||||
for param in input.generics.type_params() {
|
||||
if !no_bound.contains(¶m.ident) {
|
||||
if !no_bound.iter().any(|name| name.is_ident(¶m.ident)) {
|
||||
cg::add_predicate(
|
||||
&mut where_clause,
|
||||
parse_quote!(#param: crate::values::distance::ComputeSquaredDistance),
|
||||
|
|
|
@ -14,7 +14,7 @@ pub fn derive(mut input: syn::DeriveInput) -> TokenStream {
|
|||
let no_bound = animation_input_attrs.no_bound.unwrap_or_default();
|
||||
let mut where_clause = input.generics.where_clause.take();
|
||||
for param in input.generics.type_params() {
|
||||
if !no_bound.contains(¶m.ident) {
|
||||
if !no_bound.iter().any(|name| name.is_ident(¶m.ident)) {
|
||||
cg::add_predicate(
|
||||
&mut where_clause,
|
||||
parse_quote!(#param: crate::values::animated::ToAnimatedZero),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue