mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Fix warnings introduced in newer Rust Nightly
This does not (yet) upgrade ./rust-toolchain The warnings: * dead_code "field is never read" * redundant_semicolons "unnecessary trailing semicolon" * non_fmt_panic "panic message is not a string literal, this is no longer accepted in Rust 2021" * unstable_name_collisions "a method with this name may be added to the standard library in the future" * legacy_derive_helpers "derive helper attribute is used before it is introduced" https://github.com/rust-lang/rust/issues/79202
This commit is contained in:
parent
4353d534d4
commit
a0d9f97c8e
35 changed files with 75 additions and 116 deletions
|
@ -112,14 +112,14 @@ fn derive_variant_arm(
|
|||
}
|
||||
}
|
||||
|
||||
#[darling(attributes(animation), default)]
|
||||
#[derive(Default, FromDeriveInput)]
|
||||
#[darling(attributes(animation), default)]
|
||||
pub struct AnimationInputAttrs {
|
||||
pub no_bound: Option<PathList>,
|
||||
}
|
||||
|
||||
#[darling(attributes(animation), default)]
|
||||
#[derive(Default, FromVariant)]
|
||||
#[darling(attributes(animation), default)]
|
||||
pub struct AnimationVariantAttrs {
|
||||
pub error: bool,
|
||||
// Only here because of structs, where the struct definition acts as a
|
||||
|
@ -127,8 +127,8 @@ pub struct AnimationVariantAttrs {
|
|||
pub no_bound: Option<PathList>,
|
||||
}
|
||||
|
||||
#[darling(attributes(animation), default)]
|
||||
#[derive(Default, FromField)]
|
||||
#[darling(attributes(animation), default)]
|
||||
pub struct AnimationFieldAttrs {
|
||||
pub constant: bool,
|
||||
pub field_bound: bool,
|
||||
|
|
|
@ -118,8 +118,8 @@ fn derive_variant_arm(
|
|||
};
|
||||
}
|
||||
|
||||
#[darling(attributes(distance), default)]
|
||||
#[derive(Default, FromField)]
|
||||
#[darling(attributes(distance), default)]
|
||||
struct DistanceFieldAttrs {
|
||||
field_bound: bool,
|
||||
}
|
||||
|
|
|
@ -8,15 +8,15 @@ use proc_macro2::TokenStream;
|
|||
use syn::{self, DeriveInput, Path};
|
||||
use synstructure::{Structure, VariantInfo};
|
||||
|
||||
#[darling(attributes(parse), default)]
|
||||
#[derive(Default, FromVariant)]
|
||||
#[darling(attributes(parse), default)]
|
||||
pub struct ParseVariantAttrs {
|
||||
pub aliases: Option<String>,
|
||||
pub condition: Option<Path>,
|
||||
}
|
||||
|
||||
#[darling(attributes(parse), default)]
|
||||
#[derive(Default, FromField)]
|
||||
#[darling(attributes(parse), default)]
|
||||
pub struct ParseFieldAttrs {
|
||||
field_bound: bool,
|
||||
}
|
||||
|
|
|
@ -166,22 +166,22 @@ fn derive_struct_fields<'a>(
|
|||
true
|
||||
}
|
||||
|
||||
#[darling(attributes(value_info), default)]
|
||||
#[derive(Default, FromDeriveInput)]
|
||||
#[darling(attributes(value_info), default)]
|
||||
struct ValueInfoInputAttrs {
|
||||
ty: Option<Ident>,
|
||||
other_values: Option<String>,
|
||||
}
|
||||
|
||||
#[darling(attributes(value_info), default)]
|
||||
#[derive(Default, FromVariant)]
|
||||
#[darling(attributes(value_info), default)]
|
||||
struct ValueInfoVariantAttrs {
|
||||
starts_with_keyword: bool,
|
||||
other_values: Option<String>,
|
||||
}
|
||||
|
||||
#[darling(attributes(value_info), default)]
|
||||
#[derive(Default, FromField)]
|
||||
#[darling(attributes(value_info), default)]
|
||||
struct ValueInfoFieldAttrs {
|
||||
other_values: Option<String>,
|
||||
}
|
||||
|
|
|
@ -195,8 +195,8 @@ pub struct ToValueAttrs {
|
|||
pub no_field_bound: bool,
|
||||
}
|
||||
|
||||
#[darling(attributes(compute), default)]
|
||||
#[derive(Default, FromField)]
|
||||
#[darling(attributes(compute), default)]
|
||||
struct ComputedValueAttrs {
|
||||
field_bound: bool,
|
||||
no_field_bound: bool,
|
||||
|
|
|
@ -236,8 +236,8 @@ fn derive_single_field_expr(
|
|||
expr
|
||||
}
|
||||
|
||||
#[darling(attributes(css), default)]
|
||||
#[derive(Default, FromDeriveInput)]
|
||||
#[darling(attributes(css), default)]
|
||||
pub struct CssInputAttrs {
|
||||
pub derive_debug: bool,
|
||||
// Here because structs variants are also their whole type definition.
|
||||
|
@ -246,8 +246,8 @@ pub struct CssInputAttrs {
|
|||
pub comma: bool,
|
||||
}
|
||||
|
||||
#[darling(attributes(css), default)]
|
||||
#[derive(Default, FromVariant)]
|
||||
#[darling(attributes(css), default)]
|
||||
pub struct CssVariantAttrs {
|
||||
pub function: Option<Override<String>>,
|
||||
// Here because structs variants are also their whole type definition.
|
||||
|
@ -258,8 +258,8 @@ pub struct CssVariantAttrs {
|
|||
pub skip: bool,
|
||||
}
|
||||
|
||||
#[darling(attributes(css), default)]
|
||||
#[derive(Default, FromField)]
|
||||
#[darling(attributes(css), default)]
|
||||
pub struct CssFieldAttrs {
|
||||
pub if_empty: Option<String>,
|
||||
pub field_bound: bool,
|
||||
|
|
|
@ -44,8 +44,8 @@ pub fn derive(input: DeriveInput) -> TokenStream {
|
|||
)
|
||||
}
|
||||
|
||||
#[darling(attributes(resolve), default)]
|
||||
#[derive(Default, FromField)]
|
||||
#[darling(attributes(resolve), default)]
|
||||
struct ResolvedValueAttrs {
|
||||
field_bound: bool,
|
||||
no_field_bound: bool,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue