Commit Graph

4010 Commits

Author SHA1 Message Date
Mingun
93bda5f1dc Rename unit struct to a generic name: Info->Unit 2024-08-15 23:39:09 +05:00
Mingun
2d75ef6b30 Reuse type in newtype_variant_containing_unit 2024-08-15 23:39:07 +05:00
Mingun
f97160f715 Reuse type in unit_variant_with_unknown_fields and add test for sequence 2024-08-15 23:39:06 +05:00
Mingun
eb59c776ca Use name "tag" to refer to tag field 2024-08-15 23:39:06 +05:00
Mingun
9128201c78 Use the same order of derives 2024-08-15 23:39:05 +05:00
Mingun
2cbfd37072 Move all other internally tagged enum tests into a dedicated file
Moved all except flattened tests:
- test_internally_tagged_enum_with_skipped_conflict    => with_skipped_conflict
- test_internally_tagged_enum_new_type_with_unit       => newtype_variant_containing_unit
- test_internally_tagged_unit_enum_with_unknown_fields => unit_variant_with_unknown_fields
- test_expecting_message_internally_tagged_enum        => expecting_message
- flatten::enum_::internally_tagged::straightforward   => containing_flatten
2024-08-15 23:39:05 +05:00
Mingun
0939214c51 Move internally tagged enum tests into a dedicated file
Ctrl+X, Ctrl+V
2024-08-15 23:34:01 +05:00
Mingun
8c60f5aea7 Reorder enum variants and tests to canonical order (Unit, Newtype, Tuple, Struct) 2024-08-15 23:34:00 +05:00
Mingun
da0ed4021d Give meaningful names to enum variants 2024-08-15 23:34:00 +05:00
Mingun
99f905403b Move all internally tagged enum tests of test_macros into a dedicated module
Moved:
- test_internally_tagged_enum_with_untagged_variant             => untagged_variant
- test_internally_tagged_bytes                                  => string_and_bytes mod
- test_internally_tagged_struct_variant_containing_unit_variant => struct_variant_containing_unit_variant
- test_internally_tagged_borrow                                 => borrow
- test_enum_in_internally_tagged_enum                           => newtype_variant_containing_externally_tagged_enum
- test_internally_tagged_newtype_variant_containing_unit_struct => newtype_variant_containing_unit_struct

(review this commit with "ignore whitespace changes" option on)
2024-08-15 23:34:00 +05:00
Mingun
aa0654332d Convert test_internally_tagged_enum into module
(review this commit with "ignore whitespace changes" option on)
2024-08-15 23:33:59 +05:00
David Tolnay
af376c22c3
Merge pull request #2803 from jonhoo/mv-flatten-tests
Group flatten tests
2024-08-15 10:53:49 -07:00
Jon Gjengset
477eb7b70e
Group flatten tests 2024-08-15 18:28:49 +02:00
David Tolnay
026e91a68c
Release 1.0.208 2024-08-15 08:41:27 -07:00
David Tolnay
bfbedac919
Merge pull request #2802 from jonhoo/flatten-unit-struct
Support (de-)serializing flattened unit struct
2024-08-15 08:40:11 -07:00
Jon Gjengset
4036ff88ed
Support (de-)serializing flattened unit struct
Fixes #2801.
2024-08-15 15:50:54 +02:00
David Tolnay
1b4da41f97
Release 1.0.207 2024-08-12 13:06:46 -07:00
David Tolnay
f61d452814
Touch up PR 2795 2024-08-12 13:03:10 -07:00
David Tolnay
f9866097a0
Merge pull request #2795 from Mingun/has-flatten-rework
`has_flatten` rework
2024-08-12 13:02:58 -07:00
Mingun
77a6a9d4e1 Take into account only not skipped flatten fields when choose serialization form
Consequence: `FlattenSkipSerializing`
- uses `serialize_struct` instead of `serialize_map`
2024-08-11 20:12:09 +05:00
Mingun
547d843cca Remove dead code - serialize_struct_as_map always called when cattrs.has_flatten()==true 2024-08-11 20:12:08 +05:00
Mingun
005cb84593 Fail with an understandable message is number of fields for serialization is too many 2024-08-11 20:12:07 +05:00
Mingun
fd5b5e9aa5 Correctly calculate has_flatten attribute in all cases for deserialization
Consequence: `FlattenSkipDeserializing[DenyUnknown]`
- does not collect data in Field, because do not read them anyway
- gets `deserialize_in_place` method
- gets ability to deserialize from sequence (visit_seq method)
- uses `deserialize_struct` instead of `deserialize_map`
2024-08-11 20:01:33 +05:00
Mingun
0647a7c1fe Fix creating and filling a collections that was not read 2024-08-11 20:01:00 +05:00
David Tolnay
85c73ef8de
Release 1.0.206 2024-08-11 00:08:37 -07:00
David Tolnay
5ba1796a7e
Resolve doc_markdown pedantic lint on regression test function
warning: you should put bare URLs between `<`/`>` or make a proper Markdown link
        --> test_suite/tests/test_annotations.rs:2383:25
         |
    2383 | /// Regression test for https://github.com/serde-rs/serde/issues/1904
         |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `<https://github.com/serde-rs/serde/issues/1904>`
         |
         = 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: to override `-W clippy::pedantic` add `#[allow(clippy::doc_markdown)]`
2024-08-11 00:08:16 -07:00
David Tolnay
e52b7b380f
Touch up PR 2567 2024-08-11 00:05:56 -07:00
David Tolnay
84c7419652
Merge pull request #2794 from dtolnay/neverread
Temporarily ignore collection_is_never_read on FlattenSkipDeserializing
2024-08-11 00:05:31 -07:00
David Tolnay
536221b1f9
Temporarily ignore collection_is_never_read on FlattenSkipDeserializing
error: collection is never read
       --> test_suite/tests/test_gen.rs:723:25
        |
    723 |     #[derive(Serialize, Deserialize)]
        |                         ^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collection_is_never_read
    note: the lint level is defined here
       --> test_suite/tests/test_gen.rs:23:9
        |
    23  | #![deny(clippy::collection_is_never_read)]
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        = note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
2024-08-10 23:59:23 -07:00
David Tolnay
fc55ac70d3
Merge pull request #2567 from Mingun/fix-2565
Correctly process flatten fields in enum variants
2024-08-10 23:28:22 -07:00
Mingun
2afe5b4ef9 Add regression test for issue #2792 2024-08-10 21:29:39 +05:00
Mingun
b4ec2595c9 Correctly process flatten fields in enum variants
- Fix incorrect deserialization of variants that doesn't contain flatten field when other contains
- Fix a panic when deriving `Deserialize` for an enum with tuple and struct with flatten field

Fixes (2):
    regression::issue2565::simple_variant
    regression::issue1904 (compilation)
2024-08-09 19:59:23 +05:00
Mingun
c3ac7b675a Add regression test for issue #1904
Currently panics in derive:

error: proc-macro derive panicked
    --> test_suite\tests\test_annotations.rs:2386:25
     |
2386 |     #[derive(Serialize, Deserialize, PartialEq, Debug)]
     |                         ^^^^^^^^^^^
     |
     = help: message: assertion failed: !cattrs.has_flatten()

error: proc-macro derive panicked
  --> test_suite\tests\regression\issue1904.rs:57:10
   |
57 | #[derive(Deserialize)]
   |          ^^^^^^^^^^^
   |
   = help: message: assertion failed: !cattrs.has_flatten()

error: proc-macro derive panicked
  --> test_suite\tests\regression\issue1904.rs:47:10
   |
47 | #[derive(Deserialize)]
   |          ^^^^^^^^^^^
   |
   = help: message: assertion failed: !cattrs.has_flatten()

error: proc-macro derive panicked
  --> test_suite\tests\regression\issue1904.rs:37:10
   |
37 | #[derive(Deserialize)]
   |          ^^^^^^^^^^^
   |
   = help: message: assertion failed: !cattrs.has_flatten()

error: proc-macro derive panicked
  --> test_suite\tests\regression\issue1904.rs:27:10
   |
27 | #[derive(Deserialize)]
   |          ^^^^^^^^^^^
   |
   = help: message: assertion failed: !cattrs.has_flatten()

error: proc-macro derive panicked
  --> test_suite\tests\regression\issue1904.rs:16:10
   |
16 | #[derive(Deserialize)]
   |          ^^^^^^^^^^^
   |
   = help: message: assertion failed: !cattrs.has_flatten()

error: proc-macro derive panicked
 --> test_suite\tests\regression\issue1904.rs:7:10
  |
7 | #[derive(Deserialize)]
  |          ^^^^^^^^^^^
  |
  = help: message: assertion failed: !cattrs.has_flatten()
2024-08-09 19:55:56 +05:00
Mingun
24614e44bf Add regression test for issue #2565
failures (1):
    regression::issue2565::simple_variant
2024-08-09 19:53:14 +05:00
David Tolnay
9b868ef831
Release 1.0.205 2024-08-07 18:53:21 -07:00
David Tolnay
c3eaf76430
Merge pull request #2791 from dtolnay/flatten
Skip collecting unmatched fields in variants that do not use flatten
2024-08-07 18:52:21 -07:00
David Tolnay
32958dec3b
Skip collecting unmatched fields in variants that do not use flatten 2024-08-07 18:43:47 -07:00
David Tolnay
d64a97ba1e
Ignore confusable_idents warning in test
error: found both `σ` and `o` as identifiers, which look alike
       --> test_suite/tests/test_gen.rs:734:13
        |
    292 |         σ: f64,
        |         - other identifier used here
    ...
    734 |             o: T,
        |             ^ this identifier can be confused with `σ`
        |
    note: the lint level is defined here
       --> test_suite/tests/test_gen.rs:5:9
        |
    5   | #![deny(warnings)]
        |         ^^^^^^^^
        = note: `#[deny(confusable_idents)]` implied by `#[deny(warnings)]`
2024-08-07 18:19:51 -07:00
David Tolnay
c3df3372a1
Add test of flatten in enum
error: collection is never read
       --> test_suite/tests/test_gen.rs:728:25
        |
    728 |     #[derive(Serialize, Deserialize)]
        |                         ^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collection_is_never_read
        = note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
2024-08-07 18:19:17 -07:00
David Tolnay
8764353fe2
Enable collection_is_never_read nursury lint in test
error: collection is never read
       --> test_suite/tests/test_gen.rs:722:25
        |
    722 |     #[derive(Serialize, Deserialize)]
        |                         ^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collection_is_never_read
    note: the lint level is defined here
       --> test_suite/tests/test_gen.rs:22:9
        |
    22  | #![deny(clippy::collection_is_never_read)]
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        = note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
2024-08-07 18:16:55 -07:00
David Tolnay
e08c5de5dd
Merge pull request #2785 from Mingun/serialize_entry-in-flatten-newtype-variant
Use serialize_entry instead of serialize_key + serialize_value when serialize flatten newtype enum variant
2024-08-05 00:17:58 -07:00
Mingun
bc5af506bd Use serialize_entry instead of serialize_key + serialize_value when serialize flatten newtype enum variant
Serializers that reimplements serialize_entry will get benefits from that
2024-08-03 14:49:38 +05:00
David Tolnay
28a092261b
Work around test suite dead code warnings in nightly-2024-07-07
warning: struct `Cows` is never constructed
       --> test_suite/tests/test_borrow.rs:165:12
        |
    165 |     struct Cows<'a, 'b> {
        |            ^^^^

    warning: struct `Wrap` is never constructed
       --> test_suite/tests/test_borrow.rs:181:12
        |
    181 |     struct Wrap<'a, 'b> {
        |            ^^^^

    warning: struct `StructSkipDefaultGeneric` is never constructed
      --> test_suite/tests/test_de.rs:96:8
       |
    96 | struct StructSkipDefaultGeneric<T> {
       |        ^^^^^^^^^^^^^^^^^^^^^^^^

    warning: struct `NonAsciiIdents` is never constructed
       --> test_suite/tests/test_gen.rs:290:12
        |
    290 |     struct NonAsciiIdents {
        |            ^^^^^^^^^^^^^^
        |
    note: the lint level is defined here
       --> test_suite/tests/test_gen.rs:5:9
        |
    5   | #![deny(warnings)]
        |         ^^^^^^^^
        = note: `#[warn(dead_code)]` implied by `#[warn(warnings)]`

    warning: struct `EmptyBraced` is never constructed
       --> test_suite/tests/test_gen.rs:295:12
        |
    295 |     struct EmptyBraced {}
        |            ^^^^^^^^^^^

    warning: struct `EmptyBracedDenyUnknown` is never constructed
       --> test_suite/tests/test_gen.rs:299:12
        |
    299 |     struct EmptyBracedDenyUnknown {}
        |            ^^^^^^^^^^^^^^^^^^^^^^

    warning: struct `BracedSkipAll` is never constructed
       --> test_suite/tests/test_gen.rs:302:12
        |
    302 |     struct BracedSkipAll {
        |            ^^^^^^^^^^^^^

    warning: struct `BracedSkipAllDenyUnknown` is never constructed
       --> test_suite/tests/test_gen.rs:309:12
        |
    309 |     struct BracedSkipAllDenyUnknown {
        |            ^^^^^^^^^^^^^^^^^^^^^^^^

    warning: struct `EmptyTuple` is never constructed
       --> test_suite/tests/test_gen.rs:315:12
        |
    315 |     struct EmptyTuple();
        |            ^^^^^^^^^^

    warning: struct `EmptyTupleDenyUnknown` is never constructed
       --> test_suite/tests/test_gen.rs:319:12
        |
    319 |     struct EmptyTupleDenyUnknown();
        |            ^^^^^^^^^^^^^^^^^^^^^

    warning: struct `TupleSkipAll` is never constructed
       --> test_suite/tests/test_gen.rs:322:12
        |
    322 |     struct TupleSkipAll(#[serde(skip_deserializing)] u8);
        |            ^^^^^^^^^^^^

    warning: struct `TupleSkipAllDenyUnknown` is never constructed
       --> test_suite/tests/test_gen.rs:326:12
        |
    326 |     struct TupleSkipAllDenyUnknown(#[serde(skip_deserializing)] u8);
        |            ^^^^^^^^^^^^^^^^^^^^^^^

    warning: enum `EmptyEnum` is never used
       --> test_suite/tests/test_gen.rs:329:10
        |
    329 |     enum EmptyEnum {}
        |          ^^^^^^^^^

    warning: enum `EmptyEnumDenyUnknown` is never used
       --> test_suite/tests/test_gen.rs:333:10
        |
    333 |     enum EmptyEnumDenyUnknown {}
        |          ^^^^^^^^^^^^^^^^^^^^

    warning: enum `EnumSkipAll` is never used
       --> test_suite/tests/test_gen.rs:336:10
        |
    336 |     enum EnumSkipAll {
        |          ^^^^^^^^^^^

    warning: enum `EmptyVariants` is never used
       --> test_suite/tests/test_gen.rs:343:10
        |
    343 |     enum EmptyVariants {
        |          ^^^^^^^^^^^^^

    warning: enum `EmptyVariantsDenyUnknown` is never used
       --> test_suite/tests/test_gen.rs:355:10
        |
    355 |     enum EmptyVariantsDenyUnknown {
        |          ^^^^^^^^^^^^^^^^^^^^^^^^

    warning: struct `UnitDenyUnknown` is never constructed
       --> test_suite/tests/test_gen.rs:367:12
        |
    367 |     struct UnitDenyUnknown;
        |            ^^^^^^^^^^^^^^^

    warning: struct `EmptyArray` is never constructed
       --> test_suite/tests/test_gen.rs:370:12
        |
    370 |     struct EmptyArray {
        |            ^^^^^^^^^^

    warning: enum `Or` is never used
       --> test_suite/tests/test_gen.rs:374:10
        |
    374 |     enum Or<A, B> {
        |          ^^

    warning: enum `OrDef` is never used
       --> test_suite/tests/test_gen.rs:381:10
        |
    381 |     enum OrDef<A, B> {
        |          ^^^^^

    warning: struct `Str` is never constructed
       --> test_suite/tests/test_gen.rs:386:12
        |
    386 |     struct Str<'a>(&'a str);
        |            ^^^

    warning: struct `StrDef` is never constructed
       --> test_suite/tests/test_gen.rs:390:12
        |
    390 |     struct StrDef<'a>(&'a str);
        |            ^^^^^^

    warning: struct `Remote` is never constructed
       --> test_suite/tests/test_gen.rs:393:12
        |
    393 |     struct Remote<'a> {
        |            ^^^^^^

    warning: enum `BorrowVariant` is never used
       --> test_suite/tests/test_gen.rs:401:10
        |
    401 |     enum BorrowVariant<'a> {
        |          ^^^^^^^^^^^^^

    warning: struct `RemoteVisibility` is never constructed
       --> test_suite/tests/test_gen.rs:418:12
        |
    418 |     struct RemoteVisibility {
        |            ^^^^^^^^^^^^^^^^

    warning: struct `FlattenDenyUnknown` is never constructed
       --> test_suite/tests/test_gen.rs:551:12
        |
    551 |     struct FlattenDenyUnknown<T> {
        |            ^^^^^^^^^^^^^^^^^^

    warning: struct `StaticStrStruct` is never constructed
       --> test_suite/tests/test_gen.rs:557:12
        |
    557 |     struct StaticStrStruct<'a> {
        |            ^^^^^^^^^^^^^^^

    warning: struct `StaticStrTupleStruct` is never constructed
       --> test_suite/tests/test_gen.rs:563:12
        |
    563 |     struct StaticStrTupleStruct<'a>(&'a str, &'static str);
        |            ^^^^^^^^^^^^^^^^^^^^

    warning: struct `StaticStrNewtypeStruct` is never constructed
       --> test_suite/tests/test_gen.rs:566:12
        |
    566 |     struct StaticStrNewtypeStruct(&'static str);
        |            ^^^^^^^^^^^^^^^^^^^^^^

    warning: enum `StaticStrEnum` is never used
       --> test_suite/tests/test_gen.rs:569:10
        |
    569 |     enum StaticStrEnum<'a> {
        |          ^^^^^^^^^^^^^

    warning: enum `AdjacentlyTaggedVoid` is never used
       --> test_suite/tests/test_gen.rs:652:10
        |
    652 |     enum AdjacentlyTaggedVoid {}
        |          ^^^^^^^^^^^^^^^^^^^^

    warning: struct `ImplicitlyBorrowedOption` is never constructed
       --> test_suite/tests/test_gen.rs:665:12
        |
    665 |     struct ImplicitlyBorrowedOption<'a> {
        |            ^^^^^^^^^^^^^^^^^^^^^^^^

    warning: enum `UntaggedNewtypeVariantWith` is never used
       --> test_suite/tests/test_gen.rs:672:10
        |
    672 |     enum UntaggedNewtypeVariantWith {
        |          ^^^^^^^^^^^^^^^^^^^^^^^^^^

    warning: struct `TransparentWith` is never constructed
       --> test_suite/tests/test_gen.rs:682:12
        |
    682 |     struct TransparentWith {
        |            ^^^^^^^^^^^^^^^

    warning: struct `FlattenSkipSerializing` is never constructed
       --> test_suite/tests/test_gen.rs:712:12
        |
    712 |     struct FlattenSkipSerializing<T> {
        |            ^^^^^^^^^^^^^^^^^^^^^^

    warning: struct `FlattenSkipSerializingIf` is never constructed
       --> test_suite/tests/test_gen.rs:719:12
        |
    719 |     struct FlattenSkipSerializingIf<T> {
        |            ^^^^^^^^^^^^^^^^^^^^^^^^

    warning: struct `FlattenSkipDeserializing` is never constructed
       --> test_suite/tests/test_gen.rs:725:12
        |
    725 |     struct FlattenSkipDeserializing<T> {
        |            ^^^^^^^^^^^^^^^^^^^^^^^^

    warning: enum `Message` is never used
       --> test_suite/tests/test_gen.rs:732:10
        |
    732 |     enum Message {
        |          ^^^^^^^

    warning: struct `MacroRules` is never constructed
       --> test_suite/tests/test_gen.rs:751:20
        |
    751 |             struct MacroRules<'a> {
        |                    ^^^^^^^^^^
    ...
    758 |     deriving!(&'a str);
        |     ------------------ in this macro invocation
        |
        = note: this warning originates in the macro `deriving` (in Nightly builds, run with -Z macro-backtrace for more info)

    warning: struct `BorrowLifetimeInsideMacro` is never constructed
       --> test_suite/tests/test_gen.rs:767:12
        |
    767 |     struct BorrowLifetimeInsideMacro<'a> {
        |            ^^^^^^^^^^^^^^^^^^^^^^^^^

    warning: struct `GenericUnitStruct` is never constructed
       --> test_suite/tests/test_gen.rs:782:12
        |
    782 |     struct GenericUnitStruct<const N: usize>;
        |            ^^^^^^^^^^^^^^^^^

    warning: enum `InternallyTagged` is never used
       --> test_suite/tests/test_gen.rs:869:6
        |
    869 | enum InternallyTagged {
        |      ^^^^^^^^^^^^^^^^

    warning: function `deserialize_generic` is never used
       --> test_suite/tests/test_gen.rs:880:4
        |
    880 | fn deserialize_generic<'de, T, D>(deserializer: D) -> StdResult<T, D::Error>
        |    ^^^^^^^^^^^^^^^^^^^

    warning: struct `Restricted` is never constructed
       --> test_suite/tests/test_gen.rs:643:20
        |
    643 |             struct Restricted {
        |                    ^^^^^^^^^^

    warning: struct `Test` is never constructed
      --> test_suite/tests/test_remote.rs:95:8
       |
    95 | struct Test {
       |        ^^^^

    warning: struct `UnitDef` is never constructed
       --> test_suite/tests/test_remote.rs:135:8
        |
    135 | struct UnitDef;
        |        ^^^^^^^

    warning: struct `PrimitivePubDef` is never constructed
       --> test_suite/tests/test_remote.rs:143:8
        |
    143 | struct PrimitivePubDef(u8);
        |        ^^^^^^^^^^^^^^^

    warning: struct `NewtypePubDef` is never constructed
       --> test_suite/tests/test_remote.rs:151:8
        |
    151 | struct NewtypePubDef(#[serde(with = "UnitDef")] remote::Unit);
        |        ^^^^^^^^^^^^^

    warning: struct `TuplePubDef` is never constructed
       --> test_suite/tests/test_remote.rs:162:8
        |
    162 | struct TuplePubDef(u8, #[serde(with = "UnitDef")] remote::Unit);
        |        ^^^^^^^^^^^

    warning: struct `StructPubDef` is never constructed
       --> test_suite/tests/test_remote.rs:177:8
        |
    177 | struct StructPubDef {
        |        ^^^^^^^^^^^^

    warning: struct `StructConcrete` is never constructed
       --> test_suite/tests/test_remote.rs:193:8
        |
    193 | struct StructConcrete {
        |        ^^^^^^^^^^^^^^

    warning: enum `EnumConcrete` is never used
       --> test_suite/tests/test_remote.rs:199:6
        |
    199 | enum EnumConcrete {
        |      ^^^^^^^^^^^^

    warning: enum `ErrorKind` is never used
       --> test_suite/tests/test_remote.rs:204:6
        |
    204 | enum ErrorKind {
        |      ^^^^^^^^^

    warning: enum `ErrorKindDef` is never used
       --> test_suite/tests/test_remote.rs:214:6
        |
    214 | enum ErrorKindDef {
        |      ^^^^^^^^^^^^

    warning: struct `PrimitivePub` is never constructed
      --> test_suite/tests/test_remote.rs:10:16
       |
    10 |     pub struct PrimitivePub(pub u8);
       |                ^^^^^^^^^^^^

    warning: struct `NewtypePub` is never constructed
      --> test_suite/tests/test_remote.rs:14:16
       |
    14 |     pub struct NewtypePub(pub Unit);
       |                ^^^^^^^^^^

    warning: struct `TuplePub` is never constructed
      --> test_suite/tests/test_remote.rs:18:16
       |
    18 |     pub struct TuplePub(pub u8, pub Unit);
       |                ^^^^^^^^

    warning: struct `StructPub` is never constructed
      --> test_suite/tests/test_remote.rs:25:16
       |
    25 |     pub struct StructPub {
       |                ^^^^^^^^^

    warning: enum `EnumGeneric` is never used
      --> test_suite/tests/test_remote.rs:89:14
       |
    89 |     pub enum EnumGeneric<T> {
       |              ^^^^^^^^^^^

    warning: struct `Tuple` is never constructed
      --> test_suite/tests/test_self.rs:44:12
       |
    44 |     struct Tuple(
       |            ^^^^^

    warning: associated items `ASSOC` and `assoc` are never used
      --> test_suite/tests/test_self.rs:52:15
       |
    51 |     impl Tuple {
       |     ---------- associated items in this implementation
    52 |         const ASSOC: usize = 1;
       |               ^^^^^
    53 |         const fn assoc() -> usize {
       |                  ^^^^^

    warning: enum `Enum` is never used
      --> test_suite/tests/test_self.rs:63:10
       |
    63 |     enum Enum {
       |          ^^^^

    warning: associated items `ASSOC` and `assoc` are never used
      --> test_suite/tests/test_self.rs:79:15
       |
    78 |     impl Enum {
       |     --------- associated items in this implementation
    79 |         const ASSOC: usize = 1;
       |               ^^^^^
    80 |         const fn assoc() -> usize {
       |                  ^^^^^

    warning: struct `Unit` is never constructed
      --> test_suite/no_std/src/main.rs:26:8
       |
    26 | struct Unit;
       |        ^^^^

    warning: struct `Newtype` is never constructed
      --> test_suite/no_std/src/main.rs:29:8
       |
    29 | struct Newtype(u8);
       |        ^^^^^^^

    warning: struct `Tuple` is never constructed
      --> test_suite/no_std/src/main.rs:32:8
       |
    32 | struct Tuple(u8, u8);
       |        ^^^^^

    warning: struct `Struct` is never constructed
      --> test_suite/no_std/src/main.rs:35:8
       |
    35 | struct Struct {
       |        ^^^^^^

    warning: enum `Enum` is never used
      --> test_suite/no_std/src/main.rs:40:6
       |
    40 | enum Enum {
       |      ^^^^
2024-07-06 19:26:29 -07:00
David Tolnay
18dcae0a77
Release 1.0.204 2024-07-06 13:38:01 -07:00
David Tolnay
58c307f9cc
Alphabetize list of rustc-check-cfg 2024-07-06 13:37:24 -07:00
David Tolnay
8cc4809414
Merge pull request #2769 from dtolnay/onunimpl
Add ui test of unsatisfied serde trait bound
2024-07-06 13:33:50 -07:00
David Tolnay
1179158def
Update ui test with diagnostic::on_unimplemented from PR 2767 2024-07-06 13:29:51 -07:00
David Tolnay
91aa40e749
Add ui test of unsatisfied serde trait bound 2024-07-06 13:29:50 -07:00
David Tolnay
595019e979
Cut test_suite from workspace members in old toolchain CI jobs
The test suite's dependencies cannot be resolved by an old toolchain.

    error: failed to select a version for the requirement `toml = "^0.8"`
    candidate versions found which didn't match: 0.5.11, 0.5.10, 0.5.9, ...
    location searched: crates.io index
    required by package `trybuild v1.0.97`
        ... which satisfies dependency `trybuild = "^1.0.97"` of package `serde_test_suite v0.0.0`
2024-07-06 13:25:55 -07:00
David Tolnay
b0d7917f88
Pull in trybuild 'following types implement trait' fix 2024-07-06 13:13:32 -07:00