Commit Graph

539 Commits

Author SHA1 Message Date
Baptiste de Montangon
957ef206d1
Revisit of the representation of adjacently tagged enums tag 2023-07-31 20:53:02 +02:00
David Tolnay
e7df53701c
Resolve doc_markdown clippy lint from PR 2448
warning: item in documentation is missing backticks
        --> test_suite/tests/test_annotations.rs:2870:25
         |
    2870 |             /// Reaches crate::private:🇩🇪:content::VariantDeserializer::tuple_variant
         |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
         = note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic`
    help: try
         |
    2870 |             /// Reaches `crate::private:🇩🇪:content::VariantDeserializer::tuple_variant`
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    warning: item in documentation is missing backticks
        --> test_suite/tests/test_annotations.rs:2871:17
         |
    2871 |             /// Content::Seq case
         |                 ^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
    help: try
         |
    2871 |             /// `Content::Seq` case
         |                 ~~~~~~~~~~~~~~

    warning: item in documentation is missing backticks
        --> test_suite/tests/test_annotations.rs:2872:21
         |
    2872 |             /// via FlatMapDeserializer::deserialize_enum
         |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
    help: try
         |
    2872 |             /// via `FlatMapDeserializer::deserialize_enum`
         |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    warning: item in documentation is missing backticks
        --> test_suite/tests/test_annotations.rs:2894:25
         |
    2894 |             /// Reaches crate::private:🇩🇪:content::VariantDeserializer::struct_variant
         |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
    help: try
         |
    2894 |             /// Reaches `crate::private:🇩🇪:content::VariantDeserializer::struct_variant`
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    warning: item in documentation is missing backticks
        --> test_suite/tests/test_annotations.rs:2895:17
         |
    2895 |             /// Content::Seq case
         |                 ^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
    help: try
         |
    2895 |             /// `Content::Seq` case
         |                 ~~~~~~~~~~~~~~

    warning: item in documentation is missing backticks
        --> test_suite/tests/test_annotations.rs:2896:21
         |
    2896 |             /// via FlatMapDeserializer::deserialize_enum
         |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
    help: try
         |
    2896 |             /// via `FlatMapDeserializer::deserialize_enum`
         |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    warning: item in documentation is missing backticks
        --> test_suite/tests/test_annotations.rs:2921:25
         |
    2921 |             /// Reaches crate::private:🇩🇪:content::VariantDeserializer::struct_variant
         |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
    help: try
         |
    2921 |             /// Reaches `crate::private:🇩🇪:content::VariantDeserializer::struct_variant`
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    warning: item in documentation is missing backticks
        --> test_suite/tests/test_annotations.rs:2922:17
         |
    2922 |             /// Content::Map case
         |                 ^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
    help: try
         |
    2922 |             /// `Content::Map` case
         |                 ~~~~~~~~~~~~~~

    warning: item in documentation is missing backticks
        --> test_suite/tests/test_annotations.rs:2923:21
         |
    2923 |             /// via FlatMapDeserializer::deserialize_enum
         |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
    help: try
         |
    2923 |             /// via `FlatMapDeserializer::deserialize_enum`
         |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-07-30 16:15:29 -07:00
David Tolnay
427c839b3d
Merge pull request #2448 from Mingun/ser-flatten-enums
Implement serialization of tuple variants of flatten enums
2023-07-30 16:02:37 -07:00
Jonas Platte
31a0e73489
Update error span for attribute / data kind mismatches 2023-07-27 10:47:45 +02:00
David Tolnay
e74925bc43
Merge pull request #1695 from jplatte/rename_all_fields
Add #[serde(rename_all_fields = "foo")] attribute
2023-07-27 00:45:45 -07:00
Jonas Platte
2f9bf4d3eb
Add #[serde(rename_all_fields = "foo")] attribute 2023-07-27 09:19:42 +02:00
David Tolnay
b0f7b00e1f
Resolve manual_string_new pedantic clippy lint
warning: empty String is being created manually
        --> test_suite/tests/test_annotations.rs:2280:29
         |
    2280 |     let data = Data::C { t: "".to_string() };
         |                             ^^^^^^^^^^^^^^ help: consider using: `String::new()`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new
         = note: `-W clippy::manual-string-new` implied by `-W clippy::pedantic`
2023-07-26 13:46:28 -07:00
David Tolnay
7255e192d8
Delete unused statement from PR 2266 test 2023-07-26 13:45:49 -07:00
David Tolnay
2102e1aa42
Format PR 2266 tests with rustfmt 2023-07-26 13:41:56 -07:00
David Tolnay
b789286bc3
Merge pull request #2266 from flisky/master
fix: don't check skipped variant with internal tag
2023-07-26 13:36:33 -07:00
David Tolnay
dd9913675d
Ungroup imports 2023-07-25 23:06:34 -07:00
Mingun
1efb8b6a53 Add tests for aliases
failures (2):
    field_identifier::unknown
    variant_identifier::unknown
2023-07-23 15:23:36 +05:00
Mingun
bc1960b106 Add tests for unknown field / variant 2023-07-23 15:23:33 +05:00
Mingun
967023b755 Group field_identifier and variant_identifier tests in sub-modules
(review this commit with "ignore whitespace changes" option on)
2023-07-23 15:21:22 +05:00
Mingun
bb51e68f16 Keep aliases sorted 2023-07-23 15:21:21 +05:00
David Tolnay
100ddada2f
Suppress dead_code on fields only accessed by deserialize_in_place
error: field `option` is never read
       --> test_suite/tests/test_gen.rs:666:9
        |
    665 |     struct ImplicitlyBorrowedOption<'a> {
        |            ------------------------ field in this struct
    666 |         option: std::option::Option<&'a str>,
        |         ^^^^^^
        |
    note: the lint level is defined here
       --> test_suite/tests/test_gen.rs:5:9
        |
    5   | #![deny(warnings)]
        |         ^^^^^^^^
        = note: `#[deny(dead_code)]` implied by `#[deny(warnings)]`

    error: fields `ty` and `id` are never read
       --> test_suite/tests/test_gen.rs:696:9
        |
    695 |     struct RelObject<'a> {
        |            --------- fields in this struct
    696 |         ty: &'a str,
        |         ^^
    697 |         id: String,
        |         ^^

    error: field `field` is never read
       --> test_suite/tests/test_gen.rs:740:17
        |
    739 |             struct MacroRules<'a> {
        |                    ---------- field in this struct
    740 |                 field: $field,
        |                 ^^^^^
    ...
    745 |     deriving!(&'a str);
        |     ------------------ in this macro invocation
        |
        = note: this error originates in the macro `deriving` (in Nightly builds, run with -Z macro-backtrace for more info)

    error: field `f` is never read
       --> test_suite/tests/test_gen.rs:756:9
        |
    754 |     struct BorrowLifetimeInsideMacro<'a> {
        |            ------------------------- field in this struct
    755 |         #[serde(borrow = "'a")]
    756 |         f: mac!(Cow<'a, str>),
        |         ^

    warning: fields `question` and `answer` are never read
        --> test_suite/tests/test_annotations.rs:2969:9
         |
    2968 |     struct Struct {
         |            ------ fields in this struct
    2969 |         question: String,
         |         ^^^^^^^^
    2970 |         answer: u32,
         |         ^^^^^^
         |
         = note: `#[warn(dead_code)]` on by default
2023-07-19 09:12:35 -07:00
David Tolnay
2ef1cd4b35
Import macros exclusively through serde_derive in test suite
This makes it easier to execute tests against the precompiled serde_derive.
2023-07-19 09:08:05 -07:00
Mingun
4513a9e6a7 Move test_flatten_enum_newtype into new group of flatten tests - flatten::enum_::externally_tagged::newtype 2023-07-11 22:00:38 +05:00
Mingun
993966600e Implement tests for crate::private:🇩🇪:content::VariantDeserializer
failures (1):
    flatten::enum_::externally_tagged::tuple
2023-07-11 21:59:22 +05:00
Mingun
5b96cf1bde Use traditional order for enum variants (Unit, Newtype, Tuple, Struct) and names for tag and content fields 2023-07-11 21:58:43 +05:00
Mingun
f3d50e5209 Use FromIterator to fill HashMap 2023-07-11 21:58:14 +05:00
Mingun
ab21d4d017 Merge assert_de_tokens and assert_ser_tokens into assert_tokens 2023-07-11 21:57:49 +05:00
Mingun
f7c5d93e6a Pull up types from function into module, unify style 2023-07-11 21:57:22 +05:00
Mingun
52a7d40e6e Rename test types so their names reflects, what's tested 2023-07-11 21:56:53 +05:00
Mingun
348bc6b257 Move flatten enum tests to a dedicated module
(review with "ignore whitespace" option on and editor that shows line moves,
for example, TortoiseGitMerge)
2023-07-11 21:56:22 +05:00
David Tolnay
662fc3861c
Add test of const-generic unit struct where-clause edge case
Closes #2501.
2023-07-09 18:01:43 -07:00
Baptiste de Montangon
89c8d85de9 allow Deserialize derive to handle generic unit structs 2023-07-10 01:31:40 +02:00
David Tolnay
117ef22142
Add ui test with suffixed string literals in attribute 2023-07-09 11:09:38 -07:00
David Tolnay
e4a4389177
Delete excessive tests of adjacently tagged non-string keys 2023-07-08 18:23:31 -07:00
David Tolnay
7aa0453c3b
Merge pull request 2475 from Baptistemontan/master 2023-07-08 18:07:16 -07:00
David Tolnay
3686277e14
Merge pull request #2436 from Mingun/flatten-ignored-any
Allow to flatten `IgnoredAny`
2023-07-06 16:35:10 -07:00
David Tolnay
fa0312ac45
More formatting of doc tests and example code 2023-07-06 15:56:47 -07:00
David Tolnay
015e39776f
No need for single-element vec for chaining one element 2023-07-02 21:11:09 -07:00
David Tolnay
6a9a21f178
Resolve useless_conversion clippy lint in test
error: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
       --> test_suite/tests/test_de.rs:202:12
        |
    202 |     .chain(vec![Token::MapEnd].into_iter())
        |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `vec![Token::MapEnd]`
        |
    note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
       --> /home/david/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:522:12
        |
    522 |         U: IntoIterator<Item = Self::Item>,
        |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
        = note: `-D clippy::useless-conversion` implied by `-D clippy::all`
2023-07-02 21:10:06 -07:00
Baptiste de Montangon
c604bdbfe4 Clarified tokens that represents tag and content for integer identifiers 2023-06-12 17:17:15 +02:00
Baptiste de Montangon
9fef892f6d fixed difference in error message for adjacently tagged enums 2023-06-12 16:02:19 +02:00
Baptiste de Montangon
b1c7db47b8 Adjancently tagged enum field is determined with visit_identifier instead of only visit_str 2023-06-12 15:27:28 +02:00
David Tolnay
8a4dfa7231
Merge pull request #2466 from Mingun/fix-de-count-of-field
Fix incorrect count of fields passed to tuple deserialization methods
2023-06-07 22:13:08 -07:00
David Tolnay
a398237930
Point out serde(untagged) variants which are out of order
Previously if someone wrote an enum containing:

- `A` (untagged)
- `B` (tagged)
- `C` (tagged)
- `D` (untagged)
- `E` (tagged)
- `F` (untagged)

serde_derive would produce errors referring to B and E only, saying
you're supposed to put untagged variants at the end. The choice of B and
E for this error doesn't make a lot of sense because in order to resolve
the issue, the user must either:

- move A and D down

or:

- move B, C, and E up.

This commit changes the error to appear on A and D instead.
2023-06-07 21:49:30 -07:00
David Tolnay
43b23c7ea0
Format PR 2403 with rustfmt 2023-06-07 21:18:30 -07:00
David Ewert
48e5753e76
Allowed Enum variants to be individually marked as untagged (#2403) 2023-06-07 20:58:59 -07:00
David Tolnay
bbba632ab3
Revert "Ui tests with compile_error resolved at call site"
This reverts commit e77db40b8d.
2023-06-07 20:50:51 -07:00
David Tolnay
e77db40b8d
Ui tests with compile_error resolved at call site 2023-06-07 20:02:04 -07:00
Mingun
2c1f62d4b4 Fix incorrect count of fields passed to tuple deserialization methods
This count should mean the number of fields expected in the serialized form,
so if some fields are skipped, they shouldn't be counted

Methods affected:
- Deserializer::deserialize_tuple
- Deserializer::deserialize_tuple_struct
- VariantAccess::tuple_variant
2023-05-28 23:17:05 +05:00
David Tolnay
bd653ab30c
Format PR 2377 with rustfmt 2023-05-04 18:42:21 -07:00
David Tolnay
b5d68aedaa
Merge pull request #2377 from mfro/master
Allow bytes for adjacently tagged enums
2023-05-04 18:39:57 -07:00
David Tolnay
bd9e9abf35
Reimplement tests that touched serde_test internal API 2023-05-04 17:38:58 -07:00
Mingun
51799dd654 Allow to flatten IgnoredAny to ignore any additional data
Although any additional fields in struct by default are ignored, sometimes
this can be useful, if you use generic structures, for example
2023-04-30 01:59:55 +05:00
David Tolnay
6ab55a1e52
Add regression test for issue 2415
Currently fails:

    error: unexpected end of input, unexpected token in nested attribute, expected ident
     --> test_suite/tests/regression/issue2415.rs:4:9
      |
    4 | #[serde()]
      |         ^
2023-03-27 22:00:01 -07:00
David Tolnay
c3d637f397
Add regression test for issue 2409 2023-03-20 03:59:43 -07:00
David Tolnay
bc22641359
Rewrite attribute parser using parse_nested_meta 2023-03-17 17:23:56 -07:00
David Tolnay
32f0d00ff9
Update to syn 2 2023-03-17 17:17:40 -07:00
David Tolnay
c0296ee11b
Add ui test of malformed attribute containing expression 2023-03-16 00:15:54 -07:00
David Tolnay
b7b636a23f
Treat field-level borrow attr as duplicate of variant-level borrow attr 2023-03-11 11:17:40 -08:00
David Tolnay
eb4c3f16f7
Add a test of serde(bound = "") attribute
Without serde(bound = ""), serde_derive infers a bound of `T: Serialize`
for the generated Serialize impl and `T: Deserialize<'de> + Default` for
the Deserialize impl. `X` implements none of these so the generated code
would fail to compile.

    error[E0277]: the trait bound `X: Serialize` is not satisfied
       --> test_suite/tests/test_gen.rs:268:14
        |
    268 |     assert::<PhantomDataWrapper<X>>();
        |              ^^^^^^^^^^^^^^^^^^^^^ the trait `Serialize` is not implemented for `X`
        |
        = help: the following other types implement trait `Serialize`:
                  &'a T
                  &'a mut T
                  ()
                  (T0, T1)
                  (T0, T1, T2)
                  (T0, T1, T2, T3)
                  (T0, T1, T2, T3, T4)
                  (T0, T1, T2, T3, T4, T5)
                and 248 others
    note: required for `PhantomDataWrapper<X>` to implement `Serialize`
       --> test_suite/tests/test_gen.rs:262:14
        |
    262 |     #[derive(Serialize, Deserialize)]
        |              ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
    263 |     //#[serde(bound = "")]
    264 |     struct PhantomDataWrapper<T> {
        |            ^^^^^^^^^^^^^^^^^^^^^
    note: required by a bound in `assert`
       --> test_suite/tests/test_gen.rs:767:14
        |
    767 | fn assert<T: Serialize + DeserializeOwned>() {}
        |              ^^^^^^^^^ required by this bound in `assert`
        = note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

    error[E0277]: the trait bound `X: Deserialize<'_>` is not satisfied
       --> test_suite/tests/test_gen.rs:268:14
        |
    268 |     assert::<PhantomDataWrapper<X>>();
        |              ^^^^^^^^^^^^^^^^^^^^^ the trait `Deserialize<'_>` is not implemented for `X`
        |
        = help: the following other types implement trait `Deserialize<'de>`:
                  <&'a Path as Deserialize<'de>>
                  <&'a [u8] as Deserialize<'de>>
                  <&'a str as Deserialize<'de>>
                  <() as Deserialize<'de>>
                  <(T0, T1) as Deserialize<'de>>
                  <(T0, T1, T2) as Deserialize<'de>>
                  <(T0, T1, T2, T3) as Deserialize<'de>>
                  <(T0, T1, T2, T3, T4) as Deserialize<'de>>
                and 331 others
    note: required for `PhantomDataWrapper<X>` to implement `for<'de> Deserialize<'de>`
       --> test_suite/tests/test_gen.rs:262:25
        |
    262 |     #[derive(Serialize, Deserialize)]
        |                         ^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
    263 |     //#[serde(bound = "")]
    264 |     struct PhantomDataWrapper<T> {
        |            ^^^^^^^^^^^^^^^^^^^^^
        = note: required for `PhantomDataWrapper<X>` to implement `DeserializeOwned`
    note: required by a bound in `assert`
       --> test_suite/tests/test_gen.rs:767:26
        |
    767 | fn assert<T: Serialize + DeserializeOwned>() {}
        |                          ^^^^^^^^^^^^^^^^ required by this bound in `assert`
        = note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

    error[E0277]: the trait bound `X: Default` is not satisfied
       --> test_suite/tests/test_gen.rs:268:14
        |
    268 |     assert::<PhantomDataWrapper<X>>();
        |              ^^^^^^^^^^^^^^^^^^^^^ the trait `Default` is not implemented for `X`
        |
    note: required for `PhantomDataWrapper<X>` to implement `for<'de> Deserialize<'de>`
       --> test_suite/tests/test_gen.rs:262:25
        |
    262 |     #[derive(Serialize, Deserialize)]
        |                         ^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
    263 |     //#[serde(bound = "")]
    264 |     struct PhantomDataWrapper<T> {
        |            ^^^^^^^^^^^^^^^^^^^^^
        = note: required for `PhantomDataWrapper<X>` to implement `DeserializeOwned`
    note: required by a bound in `assert`
       --> test_suite/tests/test_gen.rs:767:26
        |
    767 | fn assert<T: Serialize + DeserializeOwned>() {}
        |                          ^^^^^^^^^^^^^^^^ required by this bound in `assert`
        = note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
    help: consider annotating `X` with `#[derive(Default)]`
        |
    779 | #[derive(Default)]
        |
2023-03-08 19:11:25 -08:00
David Tolnay
ce86f351d6
Make a directory dedicated to regression tests
I have had a good experience with this pattern in many of my other
libraries.
2023-03-08 19:02:42 -08:00
David Tolnay
0b90f6c96a
Remove the need for allow(dead_code) added by PR 2383 2023-03-08 18:59:56 -08:00
David Tolnay
be57a5e00a
Eliminate special case on empty string passed to borrow="" 2023-03-08 18:50:19 -08:00
David Tolnay
b1b09eba60
Add ui test with nonempty string containing no lifetimes 2023-03-08 18:49:59 -08:00
David Tolnay
f0dfdb5247
Resolve wildcard_imports pedantic clippy lint in test suite
error: usage of wildcard import
       --> test_suite/tests/test_gen.rs:901:9
        |
    901 |     use super::*;
        |         ^^^^^^^^ help: try: `super::Deserialize`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_imports
        = note: `-D clippy::wildcard-imports` implied by `-D clippy::pedantic`
2023-03-08 12:14:04 -08:00
David Tolnay
0750eee4ff
Merge pull request #2383 from Mingun/fix-flatten+static
Fix generation of non-existent lifetime `'de` when enum contains a #[serde(flatten)] field and a `'static` reference
2023-03-08 12:05:41 -08:00
bebecue
01da3f79c9 Add tests for #2387 2023-03-07 08:09:01 +08:00
bebecue
f5e0fbcb14 Make #[serde(alias)] works in #[serde(flatten)] context
fix #1504
2023-03-05 15:14:51 +08:00
Mingun
c7393614ff Fix generation of non-existent lifetime 'de when enum contains a #[serde(flatten)] field and a 'static reference 2023-02-27 21:03:34 +05:00
Max Froehlich
a803ec1c1f Allow bytes for adjantly tagged enums 2023-02-18 12:49:23 -08:00
David Tolnay
a9a9903107
Ignore extra_unused_type_parameters clippy lint in test
error: type parameter goes unused in function definition
       --> test_suite/tests/test_gen.rs:756:10
        |
    756 | fn assert<T: Serialize + DeserializeOwned>() {}
        |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: consider removing the parameter
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters
        = note: `-D clippy::extra-unused-type-parameters` implied by `-D clippy::all`

    error: type parameter goes unused in function definition
       --> test_suite/tests/test_gen.rs:757:14
        |
    757 | fn assert_ser<T: Serialize>() {}
        |              ^^^^^^^^^^^^^^
        |
        = help: consider removing the parameter
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

    error: type parameter goes unused in function definition
      --> test_suite/tests/test_serde_path.rs:20:18
       |
    20 |     pub fn assert<T>()
       |                  ^^^
       |
       = help: consider removing the parameter
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters
       = note: `-D clippy::extra-unused-type-parameters` implied by `-D clippy::all`
2023-02-10 19:14:43 -08:00
David Tolnay
35e5cf3e15
Revert uninlined_format_args change in test
I no longer believe in clippy's pedantic recommendation on this.
2023-02-02 11:04:23 -08:00
David Tolnay
07fc9f689e
Replace serialize_str+format -> collect_str+format_args 2023-02-02 10:50:34 -08:00
David Tolnay
14b0e18c57
Delete deny(unaligned_references) from test
warning: lint `unaligned_references` has been removed: converted into hard error, see issue #82523 <https://github.com/rust-lang/rust/issues/82523> for more information
        --> test_suite/tests/test_macros.rs:1931:8
         |
    1931 | #[deny(unaligned_references)]
         |        ^^^^^^^^^^^^^^^^^^^^
         |
         = note: `#[warn(renamed_and_removed_lints)]` on by default
2023-02-01 19:06:06 -08:00
David Tolnay
dd27ec8703
Update ui test suite to nightly-2023-02-01 2023-01-31 19:19:53 -08:00
David Tolnay
a649190a4d
Delete macro expand tests
So far I haven't ended up being that pleased with the value proposition
of these tests.
2023-01-14 12:09:05 -08:00
David Tolnay
50354c2d0b
Improve error message on remote derive duplicate generics 2022-11-27 17:48:48 -08:00
David Tolnay
c4f67e679f
Add ui test of duplicate generics in remote derive 2022-11-27 17:48:48 -08:00
David Tolnay
37021910c9
Fix Into conversion involving generic remote derive with getter 2022-11-27 17:18:10 -08:00
David Tolnay
7328b34810
Add test of generic remote derive with getter
Currently fails to compile.

    error[E0107]: missing generics for struct `StructGeneric`
       --> test_suite/tests/test_remote.rs:181:18
        |
    181 | #[serde(remote = "remote::StructGeneric")]
        |                  ^^^^^^^^^^^^^^^^^^^^^^^ expected 1 generic argument
        |
    note: struct defined here, with 1 generic parameter: `T`
       --> test_suite/tests/test_remote.rs:78:16
        |
    78  |     pub struct StructGeneric<T> {
        |                ^^^^^^^^^^^^^ -
    help: add missing generic argument
        |
    181 | #[serde(remote = StructGeneric<T>)]
        |                  ~~~~~~~~~~~~~~~~
2022-11-27 17:17:52 -08:00
David Tolnay
f4f6b5af3a
Remove unneeded turbofish from remote attr test 2022-11-27 16:32:06 -08:00
David Tolnay
9a53bd9125
Add tests of concrete def of generic remote type 2022-11-27 16:05:56 -08:00
David Tolnay
93bb9e147c
Resolve manual_let_else clippy lints
error: this could be rewritten as `let...else`
        --> test_suite/tests/test_annotations.rs:1247:5
         |
    1247 | /     let f1 = match pieces.next() {
    1248 | |         Some(x) => x,
    1249 | |         None => return Err(de::Error::invalid_length(0, &"2")),
    1250 | |     };
         | |______^ help: consider writing: `let Some(x) = pieces.next() else { return Err(de::Error::invalid_length(0, &"2")) };`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
         = note: `-D clippy::manual-let-else` implied by `-D clippy::pedantic`

    error: this could be rewritten as `let...else`
        --> test_suite/tests/test_annotations.rs:1251:5
         |
    1251 | /     let f2 = match pieces.next() {
    1252 | |         Some(x) => x,
    1253 | |         None => return Err(de::Error::invalid_length(1, &"2")),
    1254 | |     };
         | |______^ help: consider writing: `let Some(x) = pieces.next() else { return Err(de::Error::invalid_length(1, &"2")) };`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else

    error: this could be rewritten as `let...else`
        --> test_suite/tests/test_annotations.rs:1255:5
         |
    1255 | /     let f2 = match f2.parse() {
    1256 | |         Ok(n) => n,
    1257 | |         Err(_) => {
    1258 | |             return Err(de::Error::invalid_value(
    ...    |
    1262 | |         }
    1263 | |     };
         | |______^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
    help: consider writing
         |
    1255 ~     let Ok(n) = f2.parse() else {
    1256 +             return Err(de::Error::invalid_value(
    1257 +                 Unexpected::Str(f2),
    1258 +                 &"an 8-bit signed integer",
    1259 +             ));
    1260 +         };
         |
2022-11-22 18:45:27 -08:00
tage64
a07d794f74
Update test_suite/tests/test_annotations.rs
Co-authored-by: David Tolnay <dtolnay@gmail.com>
2022-10-21 08:53:55 +02:00
Tage Johansson
90d28fc314 Serialize and deserialize a tagged newtype variant over unit () as if it was a unit variant. 2022-10-21 00:27:46 +02:00
David Tolnay
f803b290f3
Ignore uninlined_format_args pedantic clippy lint false positive
Clippy's suggested fix is not valid in 2018 edition. The
serde_test_suite crate can't be updated to 2021 edition yet because CI
of the serde crate on old toolchains needs to be able to parse all
manifests in the workspace, even if serde_test_suite is not being
compiled in those builds.

    error: variables can be used directly in the `format!` string
        --> test_suite/tests/test_de.rs:2260:23
         |
    2260 |             Err(e) => panic!("tokens failed to deserialize: {}", e),
         |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
         = note: `-D clippy::uninlined-format-args` implied by `-D clippy::pedantic`
    help: change this to
         |
    2260 -             Err(e) => panic!("tokens failed to deserialize: {}", e),
    2260 +             Err(e) => panic!("tokens failed to deserialize: {e}"),
         |

    warning: unused variable: `e`
        --> test_suite/tests/test_de.rs:2260:17
         |
    2260 |             Err(e) => panic!("tokens failed to deserialize: {e}"),
         |                 ^ help: if this is intentional, prefix it with an underscore: `_e`
         |
         = note: `#[warn(unused_variables)]` on by default

    warning: panic message contains an unused formatting placeholder
        --> test_suite/tests/test_de.rs:2260:61
         |
    2260 |             Err(e) => panic!("tokens failed to deserialize: {e}"),
         |                                                             ^^^
         |
         = note: this message is not used as a format string when given without arguments, but will be in Rust 2021
         = note: `#[warn(non_fmt_panics)]` on by default
    help: add the missing argument
         |
    2260 |             Err(e) => panic!("tokens failed to deserialize: {e}", ...),
         |                                                                 +++++
    help: or add a "{}" format string to use the message literally
         |
    2260 |             Err(e) => panic!("{}", "tokens failed to deserialize: {e}"),
         |                              +++++
2022-10-07 21:46:25 -07:00
David Tolnay
d96e181150
Resolve uninlined_format_args pedantic clippy lint in test suite
error: variables can be used directly in the `format!` string
        --> test_suite/tests/test_annotations.rs:1238:30
         |
    1238 |     serializer.serialize_str(format!("{};{:?}", f1, f2).as_str())
         |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
         = note: `-D clippy::uninlined-format-args` implied by `-D clippy::pedantic`
    help: change this to
         |
    1238 -     serializer.serialize_str(format!("{};{:?}", f1, f2).as_str())
    1238 +     serializer.serialize_str(format!("{f1};{f2:?}").as_str())
         |
2022-10-07 21:45:03 -07:00
David Tolnay
3ffb86fc70
Ui test changes for trybuild 1.0.66 2022-10-04 22:28:38 -07:00
Chayim Refael Friedman
be3c37eb8b Serialize unsized RefCell, Mutex and RwLock 2022-09-22 09:57:55 +03:00
Yin Jifeng
983347484e fix: don't check skipped variant with internal tag 2022-08-23 20:19:34 +08:00
David Tolnay
a0eb83a5d4
Resolve invalid_utf8_in_unchecked clippy lint in ancient test code
error: non UTF-8 literal in `std::str::from_utf8_unchecked`
       --> test_suite/tests/test_ser.rs:803:25
        |
    803 |     let path = unsafe { str::from_utf8_unchecked(b"Hello \xF0\x90\x80World") };
        |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: `-D clippy::invalid-utf8-in-unchecked` implied by `-D clippy::all`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#invalid_utf8_in_unchecked
2022-07-18 21:29:39 -07:00
David Tolnay
bac90d19b9
Update macrotest to 1.0.9 and enable in CI 2022-06-20 03:40:49 -07:00
David Tolnay
2e38e2bf2f
Ignore derive_partial_eq_without_eq clippy lint
error: you are deriving `PartialEq` and can implement `Eq`
      --> serde/src/de/value.rs:51:17
       |
    51 | #[derive(Clone, PartialEq)]
       |                 ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = note: `-D clippy::derive-partial-eq-without-eq` implied by `-D clippy::all`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> serde_derive/src/internals/case.rs:13:23
       |
    13 | #[derive(Copy, Clone, PartialEq)]
       |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
     --> test_suite/tests/unstable/mod.rs:6:21
      |
    6 |     #[derive(Debug, PartialEq, Serialize, Deserialize)]
      |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
      |
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
     --> test_suite/tests/test_ignored_any.rs:7:10
      |
    7 | #[derive(PartialEq, Debug, Deserialize)]
      |          ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
      |
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
     --> test_suite/tests/test_identifier.rs:7:34
      |
    7 |     #[derive(Deserialize, Debug, PartialEq)]
      |                                  ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
      |
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> test_suite/tests/test_identifier.rs:24:34
       |
    24 |     #[derive(Deserialize, Debug, PartialEq)]
       |                                  ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> test_suite/tests/test_identifier.rs:41:34
       |
    41 |     #[derive(Deserialize, Debug, PartialEq)]
       |                                  ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> test_suite/tests/test_identifier.rs:59:34
       |
    59 |     #[derive(Deserialize, Debug, PartialEq)]
       |                                  ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> test_suite/tests/test_ser.rs:46:10
       |
    46 | #[derive(PartialEq, Debug)]
       |          ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> test_suite/tests/test_value.rs:11:34
       |
    11 |     #[derive(Deserialize, Debug, PartialEq)]
       |                                  ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> test_suite/tests/test_de_error.rs:15:23
       |
    15 | #[derive(Copy, Clone, PartialEq, Debug, Deserialize)]
       |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> test_suite/tests/test_de_error.rs:18:10
       |
    18 | #[derive(PartialEq, Debug, Deserialize)]
       |          ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> test_suite/tests/test_de_error.rs:26:10
       |
    26 | #[derive(PartialEq, Debug, Deserialize)]
       |          ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> test_suite/tests/test_de_error.rs:34:10
       |
    34 | #[derive(PartialEq, Debug, Deserialize)]
       |          ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> test_suite/tests/test_de_error.rs:41:19
       |
    41 | #[derive(Default, PartialEq, Debug)]
       |                   ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> test_suite/tests/test_de_error.rs:60:10
       |
    60 | #[derive(PartialEq, Debug, Deserialize)]
       |          ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> test_suite/tests/test_borrow.rs:70:34
       |
    70 |     #[derive(Deserialize, Debug, PartialEq)]
       |                                  ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> test_suite/tests/test_borrow.rs:97:34
       |
    97 |     #[derive(Deserialize, Debug, PartialEq)]
       |                                  ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_borrow.rs:106:34
        |
    106 |     #[derive(Deserialize, Debug, PartialEq)]
        |                                  ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> test_suite/tests/test_de.rs:43:23
       |
    43 | #[derive(Copy, Clone, PartialEq, Debug, Deserialize)]
       |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> test_suite/tests/test_de.rs:46:10
       |
    46 | #[derive(PartialEq, Debug, Deserialize)]
       |          ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> test_suite/tests/test_de.rs:49:10
       |
    49 | #[derive(PartialEq, Debug, Deserialize)]
       |          ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> test_suite/tests/test_de.rs:52:10
       |
    52 | #[derive(PartialEq, Debug, Deserialize)]
       |          ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> test_suite/tests/test_de.rs:76:10
       |
    76 | #[derive(PartialEq, Debug, Deserialize)]
       |          ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> test_suite/tests/test_de.rs:82:10
       |
    82 | #[derive(PartialEq, Debug, Deserialize)]
       |          ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_de.rs:102:10
        |
    102 | #[derive(PartialEq, Debug, Deserialize)]
        |          ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_de.rs:109:19
        |
    109 | #[derive(Default, PartialEq, Debug)]
        |                   ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_de.rs:128:10
        |
    128 | #[derive(PartialEq, Debug, Deserialize)]
        |          ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_de.rs:135:10
        |
    135 | #[derive(PartialEq, Debug)]
        |          ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_de.rs:185:14
        |
    185 |     #[derive(PartialEq, Debug, Deserialize)]
        |              ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> test_suite/tests/test_macros.rs:25:17
       |
    25 | #[derive(Debug, PartialEq, Serialize, Deserialize)]
       |                 ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_macros.rs:110:17
        |
    110 | #[derive(Debug, PartialEq, Serialize, Deserialize)]
        |                 ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_macros.rs:580:21
        |
    580 |     #[derive(Debug, PartialEq, Serialize, Deserialize)]
        |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_macros.rs:607:21
        |
    607 |     #[derive(Debug, PartialEq, Serialize, Deserialize)]
        |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_macros.rs:681:21
        |
    681 |     #[derive(Debug, PartialEq, Serialize, Deserialize)]
        |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_macros.rs:684:21
        |
    684 |     #[derive(Debug, PartialEq, Serialize, Deserialize)]
        |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_macros.rs:816:21
        |
    816 |     #[derive(Debug, PartialEq, Deserialize)]
        |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_macros.rs:976:21
        |
    976 |     #[derive(Debug, PartialEq, Serialize, Deserialize)]
        |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_macros.rs:1027:21
         |
    1027 |     #[derive(Debug, PartialEq, Serialize, Deserialize)]
         |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_macros.rs:1273:21
         |
    1273 |     #[derive(Debug, PartialEq, Deserialize)]
         |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_macros.rs:1342:21
         |
    1342 |     #[derive(Debug, PartialEq, Serialize, Deserialize)]
         |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_macros.rs:1413:21
         |
    1413 |     #[derive(Debug, PartialEq, Serialize, Deserialize)]
         |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_macros.rs:1450:21
         |
    1450 |     #[derive(Debug, PartialEq, Serialize, Deserialize)]
         |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_macros.rs:1474:21
         |
    1474 |     #[derive(Debug, PartialEq, Serialize, Deserialize)]
         |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_macros.rs:1509:21
         |
    1509 |     #[derive(Debug, PartialEq, Serialize, Deserialize)]
         |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_macros.rs:1543:21
         |
    1543 |     #[derive(Debug, PartialEq, Serialize, Deserialize)]
         |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_macros.rs:1601:21
         |
    1601 |     #[derive(Debug, PartialEq, Deserialize)]
         |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_macros.rs:1743:45
         |
    1743 |     #[derive(Serialize, Deserialize, Debug, PartialEq)]
         |                                             ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_macros.rs:1763:45
         |
    1763 |     #[derive(Serialize, Deserialize, Debug, PartialEq)]
         |                                             ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_macros.rs:1770:45
         |
    1770 |     #[derive(Serialize, Deserialize, Debug, PartialEq)]
         |                                             ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_macros.rs:1870:21
         |
    1870 |     #[derive(Debug, PartialEq, Serialize, Deserialize)]
         |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_macros.rs:1888:21
         |
    1888 |     #[derive(Debug, PartialEq, Serialize, Deserialize)]
         |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_annotations.rs:108:17
        |
    108 | #[derive(Debug, PartialEq, Serialize, Deserialize)]
        |                 ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_annotations.rs:124:17
        |
    124 | #[derive(Debug, PartialEq, Serialize, Deserialize)]
        |                 ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_annotations.rs:147:17
        |
    147 | #[derive(Debug, PartialEq, Serialize, Deserialize)]
        |                 ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_annotations.rs:344:17
        |
    344 | #[derive(Debug, PartialEq, Deserialize)]
        |                 ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_annotations.rs:394:17
        |
    394 | #[derive(Debug, PartialEq)]
        |                 ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_annotations.rs:413:17
        |
    413 | #[derive(Debug, PartialEq)]
        |                 ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_annotations.rs:458:17
        |
    458 | #[derive(Debug, PartialEq, Serialize, Deserialize)]
        |                 ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_annotations.rs:512:17
        |
    512 | #[derive(Debug, PartialEq, Serialize, Deserialize)]
        |                 ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_annotations.rs:520:17
        |
    520 | #[derive(Debug, PartialEq, Serialize, Deserialize)]
        |                 ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_annotations.rs:528:17
        |
    528 | #[derive(Debug, PartialEq, Deserialize)]
        |                 ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_annotations.rs:647:17
        |
    647 | #[derive(Debug, PartialEq, Serialize, Deserialize)]
        |                 ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_gen.rs:835:17
        |
    835 | #[derive(Debug, PartialEq, Deserialize)]
        |                 ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> test_suite/tests/test_annotations.rs:675:17
        |
    675 | #[derive(Debug, PartialEq, Deserialize)]
        |                 ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:1047:17
         |
    1047 | #[derive(Debug, PartialEq)]
         |                 ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:1050:17
         |
    1050 | #[derive(Debug, PartialEq)]
         |                 ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:1196:17
         |
    1196 | #[derive(Debug, PartialEq, Serialize, Deserialize)]
         |                 ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:1514:17
         |
    1514 | #[derive(Debug, PartialEq, Deserialize)]
         |                 ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:1548:41
         |
    1548 | #[derive(Clone, Serialize, Deserialize, PartialEq, Debug)]
         |                                         ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:1566:41
         |
    1566 | #[derive(Clone, Serialize, Deserialize, PartialEq, Debug)]
         |                                         ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:1600:30
         |
    1600 | #[derive(Clone, Deserialize, PartialEq, Debug)]
         |                              ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:1803:21
         |
    1803 |     #[derive(Debug, PartialEq, Serialize, Deserialize)]
         |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:1843:21
         |
    1843 |     #[derive(Debug, PartialEq, Serialize, Deserialize)]
         |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:1852:21
         |
    1852 |     #[derive(Debug, PartialEq, Serialize, Deserialize)]
         |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:1947:21
         |
    1947 |     #[derive(Debug, PartialEq, Deserialize)]
         |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2003:21
         |
    2003 |     #[derive(Debug, PartialEq, Serialize, Deserialize)]
         |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2037:21
         |
    2037 |     #[derive(Debug, PartialEq, Serialize, Deserialize)]
         |                     ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2074:45
         |
    2074 |     #[derive(Deserialize, Serialize, Debug, PartialEq)]
         |                                             ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2080:45
         |
    2080 |     #[derive(Deserialize, Serialize, Debug, PartialEq)]
         |                                             ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2157:38
         |
    2157 |     #[derive(Serialize, Deserialize, PartialEq, Debug)]
         |                                      ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2193:38
         |
    2193 |     #[derive(Serialize, Deserialize, PartialEq, Debug)]
         |                                      ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2200:38
         |
    2200 |     #[derive(Serialize, Deserialize, PartialEq, Debug)]
         |                                      ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2240:38
         |
    2240 |     #[derive(Serialize, Deserialize, PartialEq, Debug)]
         |                                      ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2279:38
         |
    2279 |     #[derive(Serialize, Deserialize, PartialEq, Debug)]
         |                                      ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2316:38
         |
    2316 |     #[derive(Serialize, Deserialize, PartialEq, Debug)]
         |                                      ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2359:38
         |
    2359 |     #[derive(Serialize, Deserialize, PartialEq, Debug)]
         |                                      ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2390:38
         |
    2390 |     #[derive(Serialize, Deserialize, PartialEq, Debug)]
         |                                      ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2421:38
         |
    2421 |     #[derive(Serialize, Deserialize, PartialEq, Debug)]
         |                                      ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2426:38
         |
    2426 |     #[derive(Serialize, Deserialize, PartialEq, Debug)]
         |                                      ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2483:38
         |
    2483 |     #[derive(Serialize, Deserialize, PartialEq, Debug)]
         |                                      ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2507:38
         |
    2507 |     #[derive(Serialize, Deserialize, PartialEq, Debug)]
         |                                      ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2521:27
         |
    2521 |     #[derive(Deserialize, PartialEq, Debug)]
         |                           ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2552:27
         |
    2552 |     #[derive(Deserialize, PartialEq, Debug)]
         |                           ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2558:27
         |
    2558 |     #[derive(Deserialize, PartialEq, Debug)]
         |                           ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2586:14
         |
    2586 |     #[derive(PartialEq, Debug)]
         |              ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2624:27
         |
    2624 |     #[derive(Deserialize, PartialEq, Debug)]
         |                           ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
        --> test_suite/tests/test_annotations.rs:2647:27
         |
    2647 |     #[derive(Deserialize, PartialEq, Debug)]
         |                           ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq
2022-05-21 20:43:51 -07:00
David Tolnay
819f90d9f6
Ignore unused_macro_rules warning in test macros
warning: 1st rule of macro `btreeset` is never used
     --> test_suite/tests/macros/mod.rs:5:5
      |
    5 |     () => {
      |     ^^
      |
      = note: `#[warn(unused_macro_rules)]` on by default

    warning: 1st rule of macro `hashset` is never used
      --> test_suite/tests/macros/mod.rs:27:5
       |
    27 |     () => {
       |     ^^

    warning: 1st rule of macro `hashmap` is never used
      --> test_suite/tests/macros/mod.rs:44:5
       |
    44 |     () => {
       |     ^^

    warning: 1st rule of macro `hashset` is never used
      --> test_suite/tests/macros/mod.rs:27:5
       |
    27 |     () => {
       |     ^^
       |
       = note: `#[warn(unused_macro_rules)]` on by default
2022-05-12 21:33:43 -07:00
David Tolnay
41823a96df
Ignore more type_repetition_in_bounds
I'm not sure what is going on with this lint but it's triggering in a
lot of test code. Will need to investigate further.

    error: this type has already been used as a bound predicate
       --> test_suite/tests/test_gen.rs:194:21
        |
    194 |             bound = "E: SerializeWith + DeserializeWith"
        |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: `-D clippy::type-repetition-in-bounds` implied by `-D clippy::pedantic`
        = help: consider combining the bounds: `"E: SerializeWith + DeserializeWith": "E: SerializeWith + DeserializeWith" + "E: SerializeWith + DeserializeWith"`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds

    error: this type has already been used as a bound predicate
       --> test_suite/tests/test_gen.rs:184:21
        |
    184 |     #[serde(bound = "D: SerializeWith + DeserializeWith")]
        |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: consider combining the bounds: `"D: SerializeWith + DeserializeWith": "D: SerializeWith + DeserializeWith" + "D: SerializeWith + DeserializeWith"`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds

    error: this type has already been used as a bound predicate
       --> test_suite/tests/test_gen.rs:210:31
        |
    210 |             bound(serialize = "E: SerializeWith")
        |                               ^^^^^^^^^^^^^^^^^^
        |
        = help: consider combining the bounds: `"E: SerializeWith": "E: SerializeWith"`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds

    error: this type has already been used as a bound predicate
       --> test_suite/tests/test_gen.rs:201:31
        |
    201 |     #[serde(bound(serialize = "D: SerializeWith", deserialize = "D: DeserializeWith"))]
        |                               ^^^^^^^^^^^^^^^^^^
        |
        = help: consider combining the bounds: `"D: SerializeWith": "D: SerializeWith"`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds

    error: this type has already been used as a bound predicate
       --> test_suite/tests/test_gen.rs:231:21
        |
    231 |             bound = "E: SerializeWith + DeserializeWith"
        |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: consider combining the bounds: `"E: SerializeWith + DeserializeWith": "E: SerializeWith + DeserializeWith" + "E: SerializeWith + DeserializeWith"`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds

    error: this type has already been used as a bound predicate
       --> test_suite/tests/test_gen.rs:221:21
        |
    221 |     #[serde(bound = "D: SerializeWith + DeserializeWith")]
        |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: consider combining the bounds: `"D: SerializeWith + DeserializeWith": "D: SerializeWith + DeserializeWith" + "D: SerializeWith + DeserializeWith"`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds

    error: this type has already been used as a bound predicate
       --> test_suite/tests/test_gen.rs:247:31
        |
    247 |             bound(serialize = "E: SerializeWith")
        |                               ^^^^^^^^^^^^^^^^^^
        |
        = help: consider combining the bounds: `"E: SerializeWith": "E: SerializeWith"`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds

    error: this type has already been used as a bound predicate
       --> test_suite/tests/test_gen.rs:238:31
        |
    238 |     #[serde(bound(serialize = "D: SerializeWith", deserialize = "D: DeserializeWith"))]
        |                               ^^^^^^^^^^^^^^^^^^
        |
        = help: consider combining the bounds: `"D: SerializeWith": "D: SerializeWith"`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds

    error: this type has already been used as a bound predicate
      --> test_suite/tests/test_annotations.rs:84:5
       |
    84 |     C: MyDefault,
       |     ^^^^^^^^^^^^
       |
       = note: `-D clippy::type-repetition-in-bounds` implied by `-D clippy::pedantic`
       = help: consider combining the bounds: `C: MyDefault`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds

    error: this type has already been used as a bound predicate
      --> test_suite/tests/test_annotations.rs:85:5
       |
    85 |     E: MyDefault,
       |     ^^^^^^^^^^^^
       |
       = help: consider combining the bounds: `E: MyDefault`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds

    error: this type has already been used as a bound predicate
       --> test_suite/tests/test_annotations.rs:105:5
        |
    105 |     C: MyDefault;
        |     ^^^^^^^^^^^^
        |
        = help: consider combining the bounds: `C: MyDefault`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds

    error: this type has already been used as a bound predicate
        --> test_suite/tests/test_annotations.rs:1066:5
         |
    1066 |     B: 'a,
         |     ^^^^^
         |
         = help: consider combining the bounds: ``
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds

    error: this type has already been used as a bound predicate
        --> test_suite/tests/test_annotations.rs:1067:5
         |
    1067 |     D: SerializeWith,
         |     ^^^^^^^^^^^^^^^^
         |
         = help: consider combining the bounds: `D: SerializeWith`
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds

    error: this type has already been used as a bound predicate
        --> test_suite/tests/test_annotations.rs:1106:5
         |
    1106 |     B: SerializeWith,
         |     ^^^^^^^^^^^^^^^^
         |
         = help: consider combining the bounds: `B: SerializeWith`
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds

    error: this type has already been used as a bound predicate
        --> test_suite/tests/test_annotations.rs:1150:5
         |
    1150 |     B: SerializeWith,
         |     ^^^^^^^^^^^^^^^^
         |
         = help: consider combining the bounds: `B: SerializeWith`
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds

    error: this type has already been used as a bound predicate
        --> test_suite/tests/test_annotations.rs:1368:5
         |
    1368 |     B: DeserializeWith,
         |     ^^^^^^^^^^^^^^^^^^
         |
         = help: consider combining the bounds: `B: DeserializeWith`
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_repetition_in_bounds
2022-04-30 21:32:36 -07:00
David Tolnay
9f29f6bb4a
Disable expandtest on miri 2022-04-24 16:01:52 -07:00
David Tolnay
f6c104fd1d
Ignore unused ignore attribute warning in some configurations 2022-04-24 16:01:22 -07:00
David Tolnay
8a3a6fb101
Disable ui test on miri 2022-04-24 15:21:17 -07:00
David Tolnay
b5c3b5e8e5
Update ui test suite to nightly-2022-04-17 2022-04-16 23:48:27 -07:00
David Tolnay
0d71ac84b5
Render 128-bit integer value into Visitor errors 2022-01-25 12:06:35 -08:00
David Tolnay
82c3eb7ba4
Add test of visitor error messages 2022-01-25 11:24:53 -08:00
David Tolnay
51aaf496d4
Write better Visitor for NonZero integers 2022-01-20 22:15:16 -08:00
David Tolnay
bc66aeb0d3
Add tests of deserializing NonZero 2022-01-20 21:55:50 -08:00
David Tolnay
7e7044d457
Ignore clippy in number conversion tests 2022-01-20 21:38:31 -08:00
David Tolnay
5498dc0550
Add tests of num conversion errors 2022-01-20 21:37:16 -08:00