cargo fix --edition

This commit is contained in:
Simon Sapin 2018-11-01 14:09:54 +01:00
parent e1fcffb336
commit a15d33a10e
197 changed files with 1414 additions and 1380 deletions

View file

@ -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 http://mozilla.org/MPL/2.0/. */
use cg;
use crate::cg;
use darling::util::IdentList;
use quote::Tokens;
use syn::{DeriveInput, Path};

View file

@ -53,9 +53,7 @@ pub fn fmap_trait_output(input: &DeriveInput, trait_path: &Path, trait_output: I
},
&GenericParam::Type(ref data) => {
let ident = data.ident;
GenericArgument::Type(
parse_quote!(<#ident as #trait_path>::#trait_output),
)
GenericArgument::Type(parse_quote!(<#ident as #trait_path>::#trait_output))
},
ref arg => panic!("arguments {:?} cannot be mapped yet", arg),
})

View file

@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use animate::{AnimationFieldAttrs, AnimationInputAttrs, AnimationVariantAttrs};
use cg;
use crate::animate::{AnimationFieldAttrs, AnimationInputAttrs, AnimationVariantAttrs};
use crate::cg;
use quote::Tokens;
use syn::{DeriveInput, Path};
use synstructure;

View file

@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cg;
use crate::cg;
use crate::to_css::CssVariantAttrs;
use quote::Tokens;
use syn::{DeriveInput, Path};
use synstructure;
use to_css::CssVariantAttrs;
#[darling(attributes(parse), default)]
#[derive(Default, FromVariant)]

View file

@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cg;
use parse::ParseVariantAttrs;
use crate::cg;
use crate::parse::ParseVariantAttrs;
use crate::to_css::{CssFieldAttrs, CssInputAttrs, CssVariantAttrs};
use quote::Tokens;
use syn::{Data, DeriveInput, Fields, Ident, Type};
use to_css::{CssFieldAttrs, CssInputAttrs, CssVariantAttrs};
pub fn derive(mut input: DeriveInput) -> Tokens {
let css_attrs = cg::parse_input_attrs::<CssInputAttrs>(&input);

View file

@ -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 http://mozilla.org/MPL/2.0/. */
use cg;
use crate::cg;
use quote;
use syn::DeriveInput;
use synstructure::BindStyle;

View file

@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use animate::{AnimationFieldAttrs, AnimationInputAttrs, AnimationVariantAttrs};
use cg;
use crate::animate::{AnimationFieldAttrs, AnimationInputAttrs, AnimationVariantAttrs};
use crate::cg;
use quote;
use syn;
use synstructure;

View file

@ -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 http://mozilla.org/MPL/2.0/. */
use cg;
use crate::cg;
use quote::Tokens;
use syn::DeriveInput;
use synstructure::BindStyle;

View file

@ -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 http://mozilla.org/MPL/2.0/. */
use cg;
use crate::cg;
use darling::util::Override;
use quote::{ToTokens, Tokens};
use syn::{self, Data, Path, WhereClause};
@ -11,10 +11,7 @@ use synstructure::{BindingInfo, Structure, VariantInfo};
pub fn derive(mut input: syn::DeriveInput) -> Tokens {
let mut where_clause = input.generics.where_clause.take();
for param in input.generics.type_params() {
cg::add_predicate(
&mut where_clause,
parse_quote!(#param: style_traits::ToCss),
);
cg::add_predicate(&mut where_clause, parse_quote!(#param: style_traits::ToCss));
}
let input_attrs = cg::parse_input_attrs::<CssInputAttrs>(&input);