error: all variants have the same prefix: `Serialize`
--> test_suite/tests/test_macros.rs:1741:5
|
1741 | / enum E {
1742 | | #[serde(rename_all = "camelCase")]
1743 | | Serialize {
1744 | | serialize: bool,
... |
1756 | | },
1757 | | }
| |_____^
|
= note: `-D clippy::enum-variant-names` implied by `-D clippy::all`
= help: remove the prefixes and use full paths to the variants instead of glob imports
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names
error: redundant closure
--> serde_derive/src/bound.rs:53:19
|
53 | .flat_map(|predicates| predicates.to_vec());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `[T]::to_vec`
|
note: the lint level is defined here
--> serde_derive/src/lib.rs:18:22
|
18 | #![deny(clippy::all, clippy::pedantic)]
| ^^^^^^^^^^^^^^^^
= note: `#[deny(clippy::redundant_closure_for_method_calls)]` implied by `#[deny(clippy::pedantic)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
error: redundant closure
--> serde_derive/src/bound.rs:75:19
|
75 | .flat_map(|predicates| predicates.to_vec());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `[T]::to_vec`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
Currently fails:
error[E0509]: cannot move out of type `RemotePackedNonCopyDef`, which implements the `Drop` trait
--> test_suite/tests/test_gen.rs:876:10
|
876 | #[derive(Deserialize)]
| ^^^^^^^^^^^
| |
| cannot move out of here
| data moved here
| move occurs because `__v1` has type `std::string::String`, which does not implement the `Copy` trait
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
Currently fails to build:
error: reference to packed field is unaligned
--> test_suite/tests/test_gen.rs:858:10
|
858 | #[derive(Serialize, Deserialize)]
| ^^^^^^^^^
|
note: the lint level is defined here
--> test_suite/tests/test_gen.rs:5:9
|
5 | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(unaligned_references)]` implied by `#[deny(warnings)]`
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)
error: reference to packed field is unaligned
--> test_suite/tests/test_gen.rs:858:21
|
858 | #[derive(Serialize, Deserialize)]
| ^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: trailing semicolon in macro used in expression position
--> serde_test/src/ser.rs:44:10
|
44 | );
| ^
...
152 | Some(&Token::BorrowedStr(_)) => assert_next_token!(self, BorrowedStr(v)),
| ---------------------------------------- in this macro invocation
|
= note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: this warning originates in the macro `assert_next_token` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: trailing semicolon in macro used in expression position
--> serde_test/src/ser.rs:36:76
|
36 | assert_next_token!($ser, stringify!($actual), Token::$actual, true);
| ^
...
386 | Token::TupleVariantEnd => assert_next_token!(self.ser, TupleVariantEnd),
| --------------------------------------------- in this macro invocation
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: this warning originates in the macro `assert_next_token` (in Nightly builds, run with -Z macro-backtrace for more info)
Clippy bug: https://github.com/rust-lang/rust-clippy/issues/7422
error: use of irregular braces for `format_args!` macro
--> test_suite/tests/test_gen.rs:528:25
|
528 | #[derive(Serialize, Deserialize)]
| ^^^^^^^^^^^
|
= note: `-D clippy::nonstandard-macro-braces` implied by `-D clippy::all`
help: consider writing `Deserialize`
--> test_suite/tests/test_gen.rs:528:25
|
528 | #[derive(Serialize, Deserialize)]
| ^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
error: use of irregular braces for `format_args!` macro
--> test_suite/tests/test_annotations.rs:1791:43
|
1791 | #[derive(Debug, PartialEq, Serialize, Deserialize)]
| ^^^^^^^^^^^
|
= note: `-D clippy::nonstandard-macro-braces` implied by `-D clippy::all`
help: consider writing `Deserialize`
--> test_suite/tests/test_annotations.rs:1791:43
|
1791 | #[derive(Debug, PartialEq, Serialize, Deserialize)]
| ^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
error: this expression borrows a reference (`&syn::Type`) that is immediately dereferenced by the compiler
--> serde_derive/src/internals/check.rs:399:37
|
399 | if let Type::Path(ty) = ungroup(&field.ty) {
| ^^^^^^^^^ help: change this to: `field.ty`
|
note: the lint level is defined here
--> serde_derive/src/lib.rs:18:9
|
18 | #![deny(clippy::all, clippy::pedantic)]
| ^^^^^^^^^^^
= note: `#[deny(clippy::needless_borrow)]` implied by `#[deny(clippy::all)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
error: this expression borrows a reference (`&str`) that is immediately dereferenced by the compiler
--> serde_derive/src/de.rs:478:52
|
478 | &type_path, params, fields, false, cattrs, &expecting,
| ^^^^^^^^^^ help: change this to: `expecting`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
error: this expression borrows a reference (`&str`) that is immediately dereferenced by the compiler
--> serde_derive/src/de.rs:564:76
|
564 | let visit_seq = Stmts(deserialize_seq_in_place(params, fields, cattrs, &expecting));
| ^^^^^^^^^^ help: change this to: `expecting`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
error: this expression borrows a reference (`&str`) that is immediately dereferenced by the compiler
--> serde_derive/src/de.rs:925:51
|
925 | &type_path, params, fields, true, cattrs, &expecting,
| ^^^^^^^^^^ help: change this to: `expecting`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
error: this expression borrows a reference (`&str`) that is immediately dereferenced by the compiler
--> serde_derive/src/de.rs:1066:76
|
1066 | let visit_seq = Stmts(deserialize_seq_in_place(params, fields, cattrs, &expecting));
| ^^^^^^^^^^ help: change this to: `expecting`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
error: this expression borrows a reference (`&proc_macro2::TokenStream`) that is immediately dereferenced by the compiler
--> serde_derive/src/de.rs:2288:80
|
2288 | let fallthrough_borrowed_arm = fallthrough_borrowed.as_ref().unwrap_or(&fallthrough_arm);
| ^^^^^^^^^^^^^^^^ help: change this to: `fallthrough_arm`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
error: this expression borrows a reference (`&syn::Member`) that is immediately dereferenced by the compiler
--> serde_derive/src/ser.rs:1102:43
|
1102 | get_member(params, field, &member)
| ^^^^^^^ help: change this to: `member`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
error: consider adding a `;` to the last statement for consistent formatting
--> serde_derive/src/internals/attr.rs:559:25
|
559 | serde_path.set(&m.path, path)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `serde_path.set(&m.path, path);`
|
note: the lint level is defined here
--> serde_derive/src/lib.rs:18:22
|
18 | #![deny(clippy::all, clippy::pedantic)]
| ^^^^^^^^^^^^^^^^
= note: `#[deny(clippy::semicolon_if_nothing_returned)]` implied by `#[deny(clippy::pedantic)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
error: consider adding a `;` to the last statement for consistent formatting
--> serde_derive/src/internals/attr.rs:1612:9
|
1612 | cx.error_spanned_by(lit, format!("failed to parse path: {:?}", string.value()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `cx.error_spanned_by(lit, format!("failed to parse path: {:?}", string.value()));`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
error: consider adding a `;` to the last statement for consistent formatting
--> serde_derive/src/internals/attr.rs:1623:9
|
1623 | cx.error_spanned_by(lit, format!("failed to parse path: {:?}", string.value()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `cx.error_spanned_by(lit, format!("failed to parse path: {:?}", string.value()));`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
error: consider adding a `;` to the last statement for consistent formatting
--> serde_derive/src/internals/attr.rs:1649:9
|
1649 | / cx.error_spanned_by(
1650 | | lit,
1651 | | format!("failed to parse type: {} = {:?}", attr_name, string.value()),
1652 | | )
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
help: add a `;` here
|
1649 | cx.error_spanned_by(
1650 | lit,
1651 | format!("failed to parse type: {} = {:?}", attr_name, string.value()),
1652 | );
|
error: consider adding a `;` to the last statement for consistent formatting
--> serde_derive/src/internals/check.rs:260:9
|
260 | / cx.error_spanned_by(
261 | | cont.original,
262 | | format!("variant field name `{}` conflicts with internal tag", tag),
263 | | )
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
help: add a `;` here
|
260 | cx.error_spanned_by(
261 | cont.original,
262 | format!("variant field name `{}` conflicts with internal tag", tag),
263 | );
|
error: consider adding a `;` to the last statement for consistent formatting
--> serde_derive/src/de.rs:2090:9
|
2090 | flat_fields.extend(aliases.iter().map(|alias| (alias, ident)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `flat_fields.extend(aliases.iter().map(|alias| (alias, ident)));`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned