diff --git a/serde_derive/src/de.rs b/serde_derive/src/de.rs index 8a9cde89..df16e8ef 100644 --- a/serde_derive/src/de.rs +++ b/serde_derive/src/de.rs @@ -566,16 +566,14 @@ fn deserialize_seq( } }); - // FIXME: parentheses around field values are because of - // https://github.com/rust-lang/rust/issues/47311 let mut result = if is_struct { let names = fields.iter().map(|f| &f.ident); quote_spanned! {Span::call_site()=> - #type_path { #( #names: (#vars) ),* } + #type_path { #( #names: #vars ),* } } } else { quote_spanned! {Span::call_site()=> - #type_path ( #((#vars)),* ) + #type_path ( #(#vars),* ) } }; @@ -718,9 +716,7 @@ fn deserialize_newtype_struct(type_path: &Tokens, params: &Parameters, field: &F } }; - // FIXME: parentheses around field values are because of - // https://github.com/rust-lang/rust/issues/47311 - let mut result = quote_spanned!(Span::call_site()=> #type_path((#value))); + let mut result = quote_spanned!(Span::call_site()=> #type_path(#value)); if params.has_getter { let this = ¶ms.this; result = quote! { @@ -2054,15 +2050,13 @@ fn deserialize_map( } }); - // FIXME: parentheses around field values are because of - // https://github.com/rust-lang/rust/issues/47311 let result = fields_names.iter().map(|&(field, ref name)| { let ident = field.ident.expect("struct contains unnamed fields"); if field.attrs.skip_deserializing() { let value = Expr(expr_is_missing(field, cattrs)); - quote_spanned!(Span::call_site()=> #ident: (#value)) + quote_spanned!(Span::call_site()=> #ident: #value) } else { - quote_spanned!(Span::call_site()=> #ident: (#name)) + quote_spanned!(Span::call_site()=> #ident: #name) } }); diff --git a/test_suite/no_std/src/main.rs b/test_suite/no_std/src/main.rs index f0737937..bcd5c480 100644 --- a/test_suite/no_std/src/main.rs +++ b/test_suite/no_std/src/main.rs @@ -9,10 +9,6 @@ #![feature(lang_items, start, compiler_builtins_lib)] #![no_std] -// https://github.com/rust-lang/rust/issues/47311 -#![allow(unused_parens)] -#![cfg_attr(feature = "cargo-clippy", allow(double_parens))] - extern crate libc; extern crate compiler_builtins; diff --git a/test_suite/tests/test_annotations.rs b/test_suite/tests/test_annotations.rs index 8bbda0fa..48a09a1a 100644 --- a/test_suite/tests/test_annotations.rs +++ b/test_suite/tests/test_annotations.rs @@ -8,10 +8,6 @@ #![cfg_attr(feature = "cargo-clippy", allow(cast_lossless))] -// https://github.com/rust-lang/rust/issues/47311 -#![allow(unused_parens)] -#![cfg_attr(feature = "cargo-clippy", allow(double_parens))] - #[macro_use] extern crate serde_derive; diff --git a/test_suite/tests/test_de.rs b/test_suite/tests/test_de.rs index f1d2b99c..3c42667d 100644 --- a/test_suite/tests/test_de.rs +++ b/test_suite/tests/test_de.rs @@ -6,9 +6,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// https://github.com/rust-lang/rust/issues/47311 -#![allow(unused_parens)] -#![cfg_attr(feature = "cargo-clippy", allow(decimal_literal_representation, double_parens))] +#![cfg_attr(feature = "cargo-clippy", allow(decimal_literal_representation))] #[macro_use] extern crate serde_derive; diff --git a/test_suite/tests/test_gen.rs b/test_suite/tests/test_gen.rs index 2e3cab4a..5f0fd696 100644 --- a/test_suite/tests/test_gen.rs +++ b/test_suite/tests/test_gen.rs @@ -13,10 +13,6 @@ #![deny(warnings)] #![cfg_attr(feature = "unstable", feature(non_ascii_idents))] -// https://github.com/rust-lang/rust/issues/47311 -#![allow(unused_parens)] -#![cfg_attr(feature = "cargo-clippy", allow(double_parens))] - #[macro_use] extern crate serde_derive; diff --git a/test_suite/tests/test_macros.rs b/test_suite/tests/test_macros.rs index 5dd489e0..ca38cbd7 100644 --- a/test_suite/tests/test_macros.rs +++ b/test_suite/tests/test_macros.rs @@ -8,9 +8,7 @@ #![deny(trivial_numeric_casts)] -// https://github.com/rust-lang/rust/issues/47311 -#![allow(unused_parens)] -#![cfg_attr(feature = "cargo-clippy", allow(double_parens, redundant_field_names))] +#![cfg_attr(feature = "cargo-clippy", allow(redundant_field_names))] #[macro_use] extern crate serde_derive; diff --git a/test_suite/tests/test_remote.rs b/test_suite/tests/test_remote.rs index a4c3a89b..ccb0bd88 100644 --- a/test_suite/tests/test_remote.rs +++ b/test_suite/tests/test_remote.rs @@ -6,9 +6,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// https://github.com/rust-lang/rust/issues/47311 -#![allow(unused_parens)] -#![cfg_attr(feature = "cargo-clippy", allow(double_parens, redundant_field_names))] +#![cfg_attr(feature = "cargo-clippy", allow(redundant_field_names))] #[macro_use] extern crate serde_derive;