David Tolnay
ef4f860384
Improve "expecting" message of adjacently tagged enum variant
2023-08-01 22:49:44 -07:00
David Tolnay
9bd52ec5c1
Inline AdjacentlyTaggedEnumVariant::new
2023-08-01 22:38:47 -07:00
David Tolnay
5cdd82d41e
Remove Serializer from name of private type that is not a Serializer
2023-08-01 22:26:04 -07:00
David Tolnay
110bf10481
Condense AdjacentlyTaggedEnummVariantVisitor implementation
2023-08-01 22:26:03 -07:00
David Tolnay
43035f6f37
Merge pull request #2505 from Baptistemontan/rework_adjacently_tagged_enum
...
Revisit of the representation of adjacently tagged enums tag
2023-08-01 22:25:31 -07:00
David Tolnay
83b1a3d5dc
Merge pull request #2443 from Mingun/deserialize-in-place
...
Simplify code in deserialize_in_place_struct and implement #2387 for in-place case
2023-08-01 21:51:22 -07:00
Mingun
878110a4bc
Simplify code after dead code elimination
2023-08-01 19:03:21 +05:00
Mingun
59ec8b7db2
Remove dead code - variant_ident and deserializer are always None
2023-08-01 19:03:20 +05:00
Mingun
cae1b43829
Inline deserialize_newtype_struct_in_place
2023-08-01 19:03:19 +05:00
Mingun
99fde4ee3e
Implement #2387 also for deserialize_in_place method
2023-08-01 19:03:19 +05:00
Mingun
afe3872810
Simplify check for missing fields
2023-08-01 19:03:18 +05:00
Mingun
3a3e6bf103
Reorder variables to match order in final quote!
2023-08-01 19:03:18 +05:00
Mingun
935f0bd70f
Merge some quote! blocks
2023-08-01 19:03:17 +05:00
Mingun
5c18bfeda6
Inline deserialize_struct_as_struct_in_place_visitor
2023-08-01 19:03:17 +05:00
Baptiste de Montangon
957ef206d1
Revisit of the representation of adjacently tagged enums tag
2023-07-31 20:53:02 +02:00
David Tolnay
0c367838cc
Merge pull request #2548 from dtolnay/toolattr
...
Adopt tool attrs for clippy lint level attributes
2023-07-31 11:48:33 -07:00
David Tolnay
2023cf345f
Adopt tool attrs for clippy lint level attributes
...
Requires rustc 1.31+.
2023-07-31 11:39:31 -07:00
David Tolnay
033d05f70b
Release 1.0.180
2023-07-31 11:16:12 -07:00
David Tolnay
fe4e3fd3b0
Merge pull request #2547 from dtolnay/tombstone
...
Delete tombstones of the `__private` module
2023-07-30 22:48:34 -07:00
David Tolnay
8a8a8a70ee
Delete tombstones of the __private module
...
These are previous names of the `__private` module -- first
`serde::export` then `serde::private` then `serde::__private` -- in all
cases marked `doc(hidden)` and documented as not public API. Leaving a
tombstone made rustc give a better diagnostic "module is private" rather
than "unresolved import". But the rename to `__private` was 2.5 years
ago in dd1f4b483e
so it's unlikely anyone
is still benefiting from the tombstone at this point.
2023-07-30 22:44:59 -07:00
David Tolnay
339dca828d
Merge pull request #2546 from dtolnay/edition
...
Update to 2018 edition
2023-07-30 22:11:44 -07:00
David Tolnay
0d7349fa4e
Resolve ambiguous core import on rustc 1.64 through 1.71
...
In 1.72+, this is fixed by https://github.com/rust-lang/rust/pull/112086 .
error[E0659]: `core` is ambiguous
--> serde/src/lib.rs:227:13
|
227 | pub use core::ffi::CStr;
| ^^^^ ambiguous name
|
= note: ambiguous because of multiple potential import sources
= note: `core` could refer to a built-in crate
= help: use `::core` to refer to this crate unambiguously
note: `core` could also refer to the module defined here
--> serde/src/lib.rs:166:5
|
166 | / mod core {
167 | | #[cfg(not(feature = "std"))]
168 | | pub use core::*;
169 | | #[cfg(feature = "std")]
170 | | pub use std::*;
171 | | }
| |_____^
= help: use `self::core` to refer to this module unambiguously
2023-07-30 22:06:18 -07:00
David Tolnay
830528d5b1
Update to 2018 edition
2023-07-30 21:45:35 -07:00
David Tolnay
ab90fbc7c9
Apply 'cargo fix --edition'
2023-07-30 21:42:57 -07:00
David Tolnay
3eec111e8f
Delete support for compilers without crate::-based module system
2023-07-30 21:42:57 -07:00
David Tolnay
9388433642
Rename 'try!' macro to 'tri!' in preparation for 2018 edition
...
Because 'try' is a keyword in 2018+.
2023-07-30 21:29:53 -07:00
David Tolnay
ba12070665
Merge pull request #2545 from dtolnay/up
...
Delete support for rustc versions 1.19 through 1.27
2023-07-30 21:25:58 -07:00
David Tolnay
a57a324d72
Delete support for compilers without NonZero integer types
2023-07-30 21:14:32 -07:00
David Tolnay
92e91b3557
Delete support for compilers without Iterator::try_for_each
2023-07-30 21:14:31 -07:00
David Tolnay
4dcf791706
Delete support for compilers without inclusive range accessors
2023-07-30 21:11:43 -07:00
David Tolnay
e77900fb94
Update integer128 case in build script
2023-07-30 21:11:09 -07:00
David Tolnay
1b14cadf20
Delete support for compilers without core::ops::Bound
2023-07-30 21:11:02 -07:00
David Tolnay
4f59cd217a
Delete support for compilers without core::time
2023-07-30 21:10:49 -07:00
David Tolnay
27c8b2d66a
Delete support for compilers without dynamically sized Rc construction
2023-07-30 20:48:27 -07:00
David Tolnay
89976c2712
Delete support for compilers without PathBuf::into_boxed_path
2023-07-30 20:48:27 -07:00
David Tolnay
c91737fef1
Delete support for compilers without CString::into_boxed_c_str
2023-07-30 20:48:27 -07:00
David Tolnay
a100719bc6
Delete support for compilers without core::cmp::Reverse
2023-07-30 20:48:27 -07:00
David Tolnay
9a0e149225
Sort version checks in build.rs
2023-07-30 20:48:27 -07:00
David Tolnay
9350927903
Delete support for compilers without std::collections::Bound
2023-07-30 20:48:27 -07:00
David Tolnay
677c13a4ec
Merge pull request #2544 from dtolnay/testprecompiled
...
Add CI job to run test suite against precompiled serde_derive
2023-07-30 18:58:13 -07:00
David Tolnay
ee8e1ee7ff
Add CI job to run test suite against precompiled serde_derive
2023-07-30 18:50:16 -07:00
David Tolnay
f969080b9f
Pull in syn fix that makes serde test suite independent of "full" feature
...
See https://github.com/dtolnay/syn/pull/1491 .
2023-07-30 17:39:44 -07:00
David Tolnay
c2b16bfbb0
Release 1.0.179
2023-07-30 17:20:10 -07: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
02c34e490b
Resolve redundant_field_names clippy lint from PR 2448
...
warning: redundant field names in struct initialization
--> serde/src/private/ser.rs:1278:13
|
1278 | map: map,
| ^^^^^^^^ help: replace it with: `map`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
= note: `-W clippy::redundant-field-names` implied by `-W clippy::all`
2023-07-30 16:07:27 -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
David Tolnay
48aa054f53
Release 1.0.178
2023-07-28 16:09:39 -07:00
David Tolnay
3616860203
Delete broken symlink from precompiled derive sources
2023-07-28 16:09:22 -07:00
David Tolnay
861b0dfea2
Consistently list StdError under 'Re-exports' heading of rustdoc
2023-07-28 16:06:49 -07:00
David Tolnay
8b3d71ae2d
Merge pull request #2541 from dtolnay/de-core-error
...
Fix `serde:🇩🇪 :StdError` in no-std unstable build
2023-07-28 16:05:14 -07:00