error[E0507]: cannot move out of `*__self` which is behind a shared reference
--> test_suite/tests/test_remote.rs:210:10
|
210 | #[derive(Serialize, Deserialize)]
| ^^^^^^^^^
| |
| data moved here
| move occurs because `unrecognized` has type `ErrorKind`, which does not implement the `Copy` trait
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider borrowing here
|
210 | #[derive(&Serialize, Deserialize)]
| +
This adds too much decompression overhead per invocation.
It could work if the subprocess were reused across multiple macro
expansions (https://github.com/serde-rs/serde/pull/2523).
warning: matching over `()` is more explicit
--> serde_derive/src/internals/attr.rs:710:33
|
710 | (Some((untagged_tokens, _)), Some((tag_tokens, _)), None) => {
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
= note: `-W clippy::ignored-unit-patterns` implied by `-W clippy::pedantic`
warning: matching over `()` is more explicit
--> serde_derive/src/internals/attr.rs:721:33
|
721 | (Some((untagged_tokens, _)), None, Some((content_tokens, _))) => {
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
warning: matching over `()` is more explicit
--> serde_derive/src/internals/attr.rs:728:33
|
728 | (Some((untagged_tokens, _)), Some((tag_tokens, _)), Some((content_tokens, _))) => {
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
warning: matching over `()` is more explicit
--> serde_derive/src/internals/attr.rs:750:44
|
750 | (_, Some((field_identifier_tokens, _)), Some((variant_identifier_tokens, _))) => {
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
warning: matching over `()` is more explicit
--> serde_derive/src/internals/attr.rs:750:82
|
750 | (_, Some((field_identifier_tokens, _)), Some((variant_identifier_tokens, _))) => {
| ^ help: use `()` instead of `_`: `()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
Unit variant of externally tagged enum cannot be deserialized from the string
token by itself. It is ContentDeserializer + serde_test::Deserializer that makes
this possible, because serde_test::Deserializer produces Content::Str() from
Token::BorrowedStr() and ContentDeserializer produces unit variant from Content::Str().
The following tokens all produces Content::String(variant):
- Token::String(variant)
- Token::Str(variant)
- Token::UnitVariant { variant, .. }
Token::BorrowedStr(variant) produces Content::Str(variant) that was the real purpose to
use it in test in #933. This actually makes this test testing `Content` rather than type itself.
Correct way to represent enum one of:
- [xxxVariant { .. }]
- [Enum { .. }, xxxVariant { variant, .. }]
- [Enum { .. }, String(variant), <variant content>]
- [Enum { .. }, Str(variant), <variant content>]
- [Enum { .. }, BorrowedStr(variant), <variant content>]