Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fork Sync: Update from parent repository #64

Open
wants to merge 324 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
324 commits
Select commit Hold shift + click to select a range
5fa711d
Release 1.0.197
dtolnay Feb 20, 2024
c9cab49
Resolve multiple_bound_locations clippy lint
dtolnay Feb 28, 2024
89139e2
Remove ineffective ?Sized bound on weak rc Deserialize impls
dtolnay Feb 28, 2024
00c4b0c
Merge pull request 2560 from Mingun/honest-test
dtolnay Mar 3, 2024
7644948
Ignore new dead_code warnings in test
dtolnay Mar 12, 2024
3f43fca
Fix warning on no edition set in serde_derive
dtolnay Mar 12, 2024
eae7c2d
Document that `len` does not include skipped struct fields
Marcono1234 Mar 16, 2024
9f8c579
Merge pull request #2714 from Marcono1234/skipped-field-struct-len
dtolnay Mar 16, 2024
364cd8d
Ignore dead code lint in tests
dtolnay Mar 24, 2024
3bfab6e
Temporarily disable miri on doctests
dtolnay Mar 25, 2024
74d0670
Explicitly install a Rust toolchain for cargo-outdated job
dtolnay Mar 26, 2024
5b24f88
Resolve legacy_numeric_constants clippy lints
dtolnay Apr 6, 2024
3d1b19e
Implement Ser+De for `Saturating<T>`
Mar 4, 2024
6e38aff
Revert "Temporarily disable miri on doctests"
dtolnay Apr 8, 2024
a6571ee
Merge pull request #2709 from jbethune/master
oli-obk Apr 11, 2024
c13b3f7
Format PR 2709
dtolnay Apr 16, 2024
01cd696
Integrate Saturating<T> deserialization into impl_deserialize_num macro
dtolnay Apr 16, 2024
65b7eea
Merge pull request #2729 from dtolnay/saturating
dtolnay Apr 16, 2024
c4fb923
Release 1.0.198
dtolnay Apr 16, 2024
f6623a3
Ignore cast_precision_loss pedantic clippy lint
dtolnay Apr 20, 2024
8fe7539
fix: ambiguous associated type in forward_to_deserialize_any!
aatifsyed Apr 26, 2024
789740b
Merge pull request #2732 from aatifsyed/master
dtolnay Apr 27, 2024
1477028
Release 1.0.199
dtolnay Apr 27, 2024
6ca499b
Only format Unexpected::Float with decimal point if it is finite
jamessan May 1, 2024
2d973c1
Merge pull request #2733 from jamessan/nan-decimal
dtolnay May 1, 2024
cc865ac
Release 1.0.200
dtolnay May 1, 2024
20306f4
Fix cfg on test_systemtime_overflow
dtolnay May 7, 2024
220ca0c
Resolve unexpected_cfgs warning
dtolnay May 5, 2024
029ab46
Merge pull request #2737 from dtolnay/checkcfg
dtolnay May 8, 2024
b4f1bc1
Release 1.0.201
dtolnay May 8, 2024
3202a68
Skip rerunning build script on library code changes
dtolnay May 9, 2024
48cc2a6
Replace use of a syn From impl
dtolnay May 15, 2024
f6ab0bc
Provide public access to RenameAllRules in serde_derive_internals
dtolnay May 15, 2024
d4b2dfb
Merge pull request #2743 from dtolnay/renameallrules
dtolnay May 15, 2024
87f635e
Release serde_derive_internals 0.29.1
dtolnay May 15, 2024
9e32a40
Release 1.0.202
dtolnay May 15, 2024
a8f1484
Rely on docs.rs to define --cfg=docsrs by default
dtolnay May 19, 2024
3761854
Merge pull request #2745 from dtolnay/docsrs
dtolnay May 19, 2024
5d3c563
Document tuple impls as fake variadic
dtolnay May 25, 2024
b7b97dd
Unindent implementation inside tuple_impl_body macro
dtolnay May 25, 2024
45ae217
Merge pull request #2747 from dtolnay/variadic
dtolnay May 25, 2024
d5bc546
Release 1.0.203
dtolnay May 25, 2024
7aafa26
Fill in ignore reasons in all #[ignore] attributes
dtolnay Jun 2, 2024
fee0b82
Fix missing close paren in crates-io.md
bm-w Jun 7, 2024
d577c4a
Merge pull request #2754 from bm-w/master
dtolnay Jun 7, 2024
9e6158e
Nightly no longer requires error_in_core feature
dtolnay Jun 10, 2024
f3dfd2a
Suppress dead code warning in test of unit struct remote derive
dtolnay Jun 27, 2024
694fe05
Use the `#[diagnostic::on_unimplemented]` attribute when possible
weiznich Jul 2, 2024
8e6637a
Merge pull request #2767 from weiznich/feature/diagnostic_on_unimplem…
dtolnay Jul 6, 2024
b0d7917
Pull in trybuild 'following types implement trait' fix
dtolnay Jul 6, 2024
595019e
Cut test_suite from workspace members in old toolchain CI jobs
dtolnay Jul 6, 2024
91aa40e
Add ui test of unsatisfied serde trait bound
dtolnay Jul 6, 2024
1179158
Update ui test with diagnostic::on_unimplemented from PR 2767
dtolnay Jul 6, 2024
8cc4809
Merge pull request #2769 from dtolnay/onunimpl
dtolnay Jul 6, 2024
58c307f
Alphabetize list of rustc-check-cfg
dtolnay Jul 6, 2024
18dcae0
Release 1.0.204
dtolnay Jul 6, 2024
28a0922
Work around test suite dead code warnings in nightly-2024-07-07
dtolnay Jul 7, 2024
21c7fd1
Add tests of #[serde(default)] attribute for units and unions
Mingun Aug 7, 2023
bc5af50
Use serialize_entry instead of serialize_key + serialize_value when s…
Mingun Aug 3, 2024
291ec50
Add tests that ensures that error reported for a path for `with` and …
Mingun Jul 22, 2023
74b538b
Produce error about mismatched types of #[serde(with = "...")] and #[…
Mingun Jul 22, 2023
e08c5de
Merge pull request #2785 from Mingun/serialize_entry-in-flatten-newty…
dtolnay Aug 5, 2024
8764353
Enable collection_is_never_read nursury lint in test
dtolnay Aug 8, 2024
c3df337
Add test of flatten in enum
dtolnay Aug 8, 2024
d64a97b
Ignore confusable_idents warning in test
dtolnay Aug 8, 2024
32958de
Skip collecting unmatched fields in variants that do not use flatten
dtolnay Aug 8, 2024
c3eaf76
Merge pull request #2791 from dtolnay/flatten
dtolnay Aug 8, 2024
9b868ef
Release 1.0.205
dtolnay Aug 8, 2024
24614e4
Add regression test for issue #2565
Mingun Aug 10, 2023
c3ac7b6
Add regression test for issue #1904
Mingun Oct 5, 2022
b4ec259
Correctly process flatten fields in enum variants
Mingun Jul 23, 2023
2afe5b4
Add regression test for issue #2792
Mingun Aug 10, 2024
fc55ac7
Merge pull request #2567 from Mingun/fix-2565
dtolnay Aug 11, 2024
536221b
Temporarily ignore collection_is_never_read on FlattenSkipDeserializing
dtolnay Aug 11, 2024
84c7419
Merge pull request #2794 from dtolnay/neverread
dtolnay Aug 11, 2024
e52b7b3
Touch up PR 2567
dtolnay Aug 11, 2024
5ba1796
Resolve doc_markdown pedantic lint on regression test function
dtolnay Aug 11, 2024
85c73ef
Release 1.0.206
dtolnay Aug 11, 2024
0647a7c
Fix creating and filling a collections that was not read
Mingun Aug 11, 2024
fd5b5e9
Correctly calculate `has_flatten` attribute in all cases for deserial…
Mingun Aug 11, 2024
005cb84
Fail with an understandable message is number of fields for serializa…
Mingun Aug 11, 2024
547d843
Remove dead code - serialize_struct_as_map always called when cattrs.…
Mingun Aug 11, 2024
77a6a9d
Take into account only not skipped flatten fields when choose seriali…
Mingun Aug 11, 2024
9c95426
Include variant aliases in error messages
Mingun Aug 10, 2023
8b769fc
Remove unused component from tuple
Mingun Aug 10, 2023
f986609
Merge pull request #2795 from Mingun/has-flatten-rework
dtolnay Aug 12, 2024
f61d452
Touch up PR 2795
dtolnay Aug 12, 2024
1b4da41
Release 1.0.207
dtolnay Aug 12, 2024
4036ff8
Support (de-)serializing flattened unit struct
jonhoo Aug 15, 2024
bfbedac
Merge pull request #2802 from jonhoo/flatten-unit-struct
dtolnay Aug 15, 2024
026e91a
Release 1.0.208
dtolnay Aug 15, 2024
477eb7b
Group flatten tests
jonhoo Aug 15, 2024
af376c2
Merge pull request #2803 from jonhoo/mv-flatten-tests
dtolnay Aug 15, 2024
aa06543
Convert test_internally_tagged_enum into module
Mingun Apr 22, 2023
99f9054
Move all internally tagged enum tests of `test_macros` into a dedicat…
Mingun Jul 27, 2023
da0ed40
Give meaningful names to enum variants
Mingun Apr 22, 2023
8c60f5a
Reorder enum variants and tests to canonical order (Unit, Newtype, Tu…
Mingun Apr 22, 2023
0939214
Move internally tagged enum tests into a dedicated file
Mingun Jul 27, 2023
2cbfd37
Move all other internally tagged enum tests into a dedicated file
Mingun Jul 27, 2023
9128201
Use the same order of derives
Mingun Aug 7, 2023
eb59c77
Use name "tag" to refer to tag field
Mingun Aug 7, 2023
f97160f
Reuse type in unit_variant_with_unknown_fields and add test for sequence
Mingun Aug 7, 2023
2d75ef6
Reuse type in newtype_variant_containing_unit
Mingun Aug 7, 2023
93bda5f
Rename unit struct to a generic name: Info->Unit
Mingun Aug 7, 2023
48de0c5
Share unit struct Unit between all tests
Mingun Aug 7, 2023
d3492d8
Reuse type in newtype_variant_containing_unit_struct
Mingun Aug 7, 2023
e999600
Rename externally tagged enum Inner to Enum
Mingun Aug 7, 2023
28a775d
Share externally tagged enum Enum between all tests and reuse in stru…
Mingun Aug 7, 2023
41b9c33
Reuse type in newtype_variant_containing_externally_tagged_enum
Mingun Aug 7, 2023
7c0e6bd
Reuse type in struct_variant_containing_unit_variant
Mingun Aug 7, 2023
8bfe0d0
Move and rename tests:
Mingun Aug 7, 2023
4987fd1
Convert newtype_enum and struct_enum tests into modules
Mingun Aug 7, 2023
4795450
Add tests with borrowed strings for the tag field name and tag value
Mingun Aug 7, 2023
71ed1f2
Add tests for special and general cases for internally tagged enums
Mingun Oct 3, 2022
2adb0e9
Add additional checks for unit and newtype_unit tests
Mingun Aug 7, 2023
1a9ffdb
Merge pull request #2788 from Mingun/internally-tagged-enum-tests
dtolnay Aug 15, 2024
5e37ade
Move all adjacently tagged enum tests (except flatten) into a dedicat…
Mingun Aug 13, 2023
5a359e1
Group Newtype variant checks in test_adjacently_tagged_enum together
Mingun Aug 13, 2023
bee7470
Split test test_adjacently_tagged_enum into four tests for each variant
Mingun Aug 13, 2023
59628d1
Create only one value for all checks
Mingun Aug 13, 2023
36b9a85
Test deserialization of the serialized unit format for adjacently tag…
Mingun Aug 11, 2024
9d0f811
Remove unnecessary generic
Mingun Aug 11, 2024
5445f17
Reuse AdjacentlyTagged enum in newtype_with_newtype test
Mingun Aug 11, 2024
df07751
Group newtype and newtype_with_newtype tests
Mingun Aug 11, 2024
42e63ff
Reuse AdjacentlyTagged enum in `bytes` test
Mingun Aug 13, 2023
3dc6829
Integrate `bytes` test into `struct_` test
Mingun Aug 13, 2023
a7f0bab
Document fields in internal structs used to deserialize adjacently ta…
Mingun Aug 11, 2024
29dc6c3
Unit: add tests for deserialization from sequence
Mingun Aug 11, 2024
a02da49
Unit: add tests for deserialization from integer tag and content fields
Mingun Aug 11, 2024
6bfe1c4
Unit: add tests for deserialization from bytes tag and content fields
Mingun Aug 16, 2024
d5a9c11
No need to test integer and byte array field names, they already test…
Mingun Aug 16, 2024
b0d651b
Newtype: add tests for deserialization from sequence
Mingun Aug 16, 2024
a94d875
Newtype: move up the test with tag only
Mingun Aug 16, 2024
c383e4f
Tuple: add tests for deserialization from sequence
Mingun Aug 16, 2024
9f72ce6
Struct: add tests for deserialization from sequence
Mingun Aug 16, 2024
31ca16d
Merge pull request #2804 from Mingun/adjacently-tagged-tests
dtolnay Aug 23, 2024
98fb7d9
Move all untagged enum tests (except flatten) into a dedicated module
Mingun Aug 16, 2024
8514f41
Remove unnecessary generics
Mingun Aug 17, 2024
2dddc77
Cover ContentRefDeserializer::deserialize_option
Mingun Aug 17, 2024
171c6da
Complete coverage of ContentRefDeserializer::deserialize_newtype_struct
Mingun Aug 17, 2024
0093f74
Split test newtype_enum into four tests for each variant
Mingun Aug 17, 2024
6588b0a
Cover Content::Seq case in VariantRefDeserializer::struct_variant
Mingun Aug 17, 2024
4c5fec1
Test special cases that reaches SeqRefDeserializer::deserialize_any l…
Mingun Aug 17, 2024
da7fc79
Fix deserialization of empty struct variant in untagged enums
Mingun Aug 17, 2024
7bde100
Replace MapRefDeserializer with value::MapDeserializer
Mingun Aug 17, 2024
9eaf7b9
Merge pull request #2805 from Mingun/untagged-tests
dtolnay Aug 24, 2024
87a2fb0
Wrap comments from PR 2805 to 80 columns
dtolnay Aug 24, 2024
b84e6ca
Improve wording of PR 2805 comments
dtolnay Aug 24, 2024
30752ac
Release 1.0.209
dtolnay Aug 24, 2024
3aca38d
Upload CI Cargo.lock for reproducing failures
dtolnay Aug 25, 2024
f2899a9
Implement serialize/deserialize for core::net instead of std::net if …
MathiasKoch Sep 5, 2024
d940fe1
Reuse existing Buf wrapper as replacement for std::io::Write
MathiasKoch Sep 5, 2024
b4f860e
Merge pull request #2816 from MathiasKoch/chore/core-net
dtolnay Sep 6, 2024
b1f899f
Delete doc(cfg) attribute from impls that are supported in no-std
dtolnay Sep 6, 2024
07e614b
Merge pull request #2817 from dtolnay/corenet
dtolnay Sep 6, 2024
26fb134
Relocate cfg attrs out of parse_ip_impl and parse_socket_impl
dtolnay Sep 6, 2024
4c0dd63
Delete attr support from core::net deserialization macros
dtolnay Sep 6, 2024
d549f04
Reformat parse_ip_impl definition and calls
dtolnay Sep 6, 2024
785c2d9
Stabilize no-std StdError trait
dtolnay Sep 6, 2024
eeb8e44
Merge pull request #2818 from dtolnay/coreerror
dtolnay Sep 6, 2024
89c4b02
Release 1.0.210
dtolnay Sep 6, 2024
1d7b009
Eliminate closures capturing needlessly many type parameters
dtolnay Sep 6, 2024
c82f258
Merge pull request #2821 from dtolnay/clos
dtolnay Sep 6, 2024
aba4e18
Remove explicit ContentDeserializer construction in visit functions
dtolnay Sep 7, 2024
4487cb2
Merge pull request #2822 from dtolnay/mapcontentdeserializer
dtolnay Sep 7, 2024
31000e1
Add a funding file
dtolnay Sep 23, 2024
8e1ae68
Resolve some needless_lifetimes clippy lints
dtolnay Oct 7, 2024
4b3178b
Ignore needless_lifetimes clippy lint
dtolnay Oct 7, 2024
8b0f482
Update for precise capture bounds
dtolnay Oct 21, 2024
04bb76b
Merge pull request #2558 from Mingun/correct-span
oli-obk Oct 21, 2024
3415619
Merge pull request #2566 from Mingun/variant-aliases
oli-obk Oct 21, 2024
422c719
Temporarily disable 1.56 CI
dtolnay Oct 22, 2024
53ade10
Update ui tests from PR 2558
dtolnay Oct 22, 2024
966e9cc
Merge pull request #2839 from dtolnay/pr2558
dtolnay Oct 22, 2024
a8cbc91
Ignore needless_lifetimes clippy lint in generated code
dtolnay Oct 22, 2024
5382ef3
Merge pull request #2840 from dtolnay/needlesslifetimes
dtolnay Oct 22, 2024
6a7de26
Ignore uninlined_format_args pedantic clippy lint
dtolnay Oct 22, 2024
991e344
Raise required compiler for serde_derive to 1.61
dtolnay Oct 22, 2024
d4486be
Format all ui tests from PR 2558 using rustfmt
dtolnay Oct 22, 2024
00460b8
Fix wording in comments from PR 2558
dtolnay Oct 22, 2024
ab4f3f3
Reduce scope of quote_spanned on SerializeWith wrapper
dtolnay Oct 22, 2024
830309f
Merge pull request #2841 from dtolnay/serializewith
dtolnay Oct 22, 2024
3393ad6
Make most of prepare_enum_variant_enum independent of variant_names_i…
dtolnay Oct 22, 2024
0a06af8
Rename field_names_idents -> field_idents_aliases
dtolnay Oct 22, 2024
c6a5be7
Rename variant_names_idents -> variant_idents_aliases
dtolnay Oct 22, 2024
1f9eb83
Merge pull request #2842 from dtolnay/identsaliases
dtolnay Oct 22, 2024
09f6d93
Collect field ident and aliases into a struct
dtolnay Oct 22, 2024
af4c388
Merge pull request #2843 from dtolnay/fieldwithaliases
dtolnay Oct 22, 2024
1b8310d
Release 1.0.211
dtolnay Oct 22, 2024
29d4f3e
Format regression tests with rustfmt
dtolnay Oct 22, 2024
0058c72
Add regression test for issue 2844
dtolnay Oct 22, 2024
1e36ef5
Fix hygiene of macro-generated local variable accesses in serde(with)…
dtolnay Oct 22, 2024
1ac054b
Merge pull request #2845 from dtolnay/withlocal
dtolnay Oct 22, 2024
7ae1b5f
Release 1.0.212
dtolnay Oct 22, 2024
49e11ce
Ignore trivially_copy_pass_by_ref pedantic clippy lint in test
dtolnay Oct 22, 2024
fdc36e5
Add regression test for issue 2846
dtolnay Oct 22, 2024
b60e409
Hygiene for macro-generated newtype struct deserialization with 'with…
dtolnay Oct 22, 2024
79925ac
Ignore dead_code warning in regression test
dtolnay Oct 22, 2024
ef0ed22
Merge pull request #2847 from dtolnay/newtypewith
dtolnay Oct 22, 2024
58a8d22
Release 1.0.213
dtolnay Oct 22, 2024
9cda015
Implement IntoDeserializer for all Deserializers in serde::de::value …
Mingun Aug 11, 2023
5f9fffa
Add checks for conflicts for aliases
Mingun Aug 8, 2023
210373b
Merge pull request #2568 from Mingun/into_deserializer-for-deserializers
dtolnay Oct 28, 2024
4180621
Release 1.0.214
dtolnay Oct 28, 2024
adf05a5
Merge pull request #2562 from Mingun/alias-check
oli-obk Nov 1, 2024
951ca5a
pacify clippy
oli-obk Nov 1, 2024
a95b0d3
Merge pull request #2853 from serde-rs/oli-obk-patch-1
oli-obk Nov 1, 2024
60ac737
Prevent upload-artifact step from causing CI failure
dtolnay Nov 9, 2024
3035d4f
Rename Name -> MultiName
dtolnay Nov 11, 2024
f0b5c4f
Move MultiName to a new module
dtolnay Nov 11, 2024
373edcd
Keep track of a span for alias strings
dtolnay Nov 11, 2024
7f1e697
Merge pull request #2855 from dtolnay/namespan
dtolnay Nov 11, 2024
c59e876
Produce a separate warning for every colliding name
dtolnay Nov 11, 2024
b1353a9
Merge pull request #2856 from dtolnay/dename
dtolnay Nov 11, 2024
a20e924
Revert "pacify clippy"
dtolnay Nov 11, 2024
edd6fe9
Revert "Add checks for conflicts for aliases"
dtolnay Nov 11, 2024
111ecc5
Update ui tests for warning on colliding aliases
dtolnay Nov 11, 2024
7d96352
Merge pull request #2857 from dtolnay/collide
dtolnay Nov 11, 2024
1a3cf4b
Update PR 2562 ui tests
dtolnay Nov 11, 2024
fa5d58c
Use ui test syntax that does not interfere with rustfmt
dtolnay Nov 11, 2024
8939af4
Release 1.0.215
dtolnay Nov 11, 2024
0307f60
Resolve question_mark clippy lint in build script
dtolnay Nov 16, 2024
c270e27
Use BuildHasher instead of Hasher in collection macros
dtolnay Nov 16, 2024
b9dbfcb
Switch out fnv in favor of foldhash in test
dtolnay Nov 16, 2024
e9c399c
Mark generated `impl de::Visitor` blocks as `#[automatically_derived]`
tdittr Dec 5, 2024
46e9ecf
Merge pull request #2866 from tdittr/mark-visitors-as-generated
oli-obk Dec 9, 2024
9497463
Mark all generated trait impls as #[automatically_derived]
dtolnay Dec 11, 2024
f91d2ed
Merge pull request #2868 from dtolnay/automaticallyderived
dtolnay Dec 11, 2024
ad8dd41
Release 1.0.216
dtolnay Dec 11, 2024
dbb9091
Replace #[start] with extern fn main
dtolnay Dec 20, 2024
8478a3b
Merge pull request #2871 from dtolnay/nostdstart
dtolnay Dec 20, 2024
eb5cd47
Drop #[lang = "eh_personality"] from no-std test
dtolnay Dec 20, 2024
b9f93f9
Add no-std CI on stable compiler
dtolnay Dec 20, 2024
2a5caea
Merge pull request #2872 from dtolnay/ehpersonality
dtolnay Dec 20, 2024
b6f339c
Resolve repr_packed_without_abi clippy lint in tests
dtolnay Dec 27, 2024
cb6eaea
Fix roundtrip inconsistency:
Mingun Aug 3, 2024
930401b
Release 1.0.217
dtolnay Dec 27, 2024
1e2f931
Remove **/*.rs.bk from project-specific gitignore
dtolnay Jan 23, 2025
dc3031b
Remove *.sw[po] from gitignore
dtolnay Jan 23, 2025
04ff3e8
More precise gitignore patterns
dtolnay Jan 23, 2025
7cd4d84
Update ui test suite to nightly-2025-02-07
dtolnay Feb 7, 2025
aaccac7
Unset doc-scrape-examples for lib target
dtolnay Feb 10, 2025
abe7194
Update ui test suite to nightly-2025-02-12
dtolnay Feb 12, 2025
85cb0c4
Convert html links to intra-doc links
dtolnay Feb 20, 2025
03dc0fc
Merge pull request #2894 from dtolnay/doclink
dtolnay Feb 20, 2025
2b44efb
Point standard library links to stable
dtolnay Feb 20, 2025
723a949
Merge pull request #2895 from dtolnay/stabledoc
dtolnay Feb 20, 2025
7bfd518
Release 1.0.218
dtolnay Feb 20, 2025
6a630cf
Also link to stable proc_macro
dtolnay Feb 20, 2025
e3eaa6a
Merge pull request #2896 from dtolnay/stabledoc
dtolnay Feb 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: dtolnay
32 changes: 30 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cd test_suite && cargo test --features unstable
- uses: actions/upload-artifact@v4
if: always()
with:
name: Cargo.lock
path: Cargo.lock
continue-on-error: true

windows:
name: Test suite (windows)
Expand All @@ -46,6 +52,7 @@ jobs:
toolchain: ${{matrix.rust}}
- run: cd serde && cargo build --features rc
- run: cd serde && cargo build --no-default-features
- run: cd test_suite/no_std && cargo build

nightly:
name: Rust nightly ${{matrix.os == 'windows' && '(windows)' || ''}}
Expand Down Expand Up @@ -84,17 +91,22 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
- run: sed -i '/"test_suite"/d' Cargo.toml
- run: cd serde && cargo build --features rc
- run: cd serde && cargo build --no-default-features
- run: cd serde && cargo build

derive:
name: Rust 1.56.0
name: Rust 1.61.0
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
- uses: dtolnay/[email protected]
- run: |
sed -i 's/proc-macro2 = { workspace = true/proc-macro2 = { version = "1"/' serde_derive*/Cargo.toml
sed -i 's/quote = { workspace = true/quote = { version = "1"/' serde_derive*/Cargo.toml
sed -i 's/syn = { workspace = true/syn = { version = "2"/' serde_derive*/Cargo.toml
- run: cd serde && cargo check --no-default-features
- run: cd serde && cargo check
- run: cd serde_derive && cargo check
Expand All @@ -106,6 +118,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
- run: sed -i '/"test_suite"/d' Cargo.toml
- run: cd serde && cargo build --no-default-features --features alloc

minimal:
Expand All @@ -118,6 +131,20 @@ jobs:
- run: cargo generate-lockfile -Z minimal-versions
- run: cargo check --locked --workspace

doc:
name: Documentation
runs-on: ubuntu-latest
timeout-minutes: 45
env:
RUSTDOCFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: dtolnay/install@cargo-docs-rs
- run: cargo docs-rs -p serde
- run: cargo docs-rs -p serde_derive
- run: cargo docs-rs -p serde_derive_internals

clippy:
name: Clippy
runs-on: ubuntu-latest
Expand Down Expand Up @@ -154,5 +181,6 @@ jobs:
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/install@cargo-outdated
- run: cargo outdated --workspace --exit-code 1
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
target/
**/*.rs.bk
*.sw[po]
Cargo.lock
/target/
/Cargo.lock
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ members = [

[patch.crates-io]
serde = { path = "serde" }

[workspace.dependencies]
proc-macro2 = { version = "1.0.74", default-features = false }
quote = { version = "1.0.35", default-features = false }
syn = { version = "2.0.81", default-features = false }
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Serde &emsp; [![Build Status]][actions] [![Latest Version]][crates.io] [![serde: rustc 1.31+]][Rust 1.31] [![serde_derive: rustc 1.56+]][Rust 1.56]
# Serde &emsp; [![Build Status]][actions] [![Latest Version]][crates.io] [![serde msrv]][Rust 1.31] [![serde_derive msrv]][Rust 1.61]

[Build Status]: https://img.shields.io/github/actions/workflow/status/serde-rs/serde/ci.yml?branch=master
[actions]: https://github.com/serde-rs/serde/actions?query=branch%3Amaster
[Latest Version]: https://img.shields.io/crates/v/serde.svg
[crates.io]: https://crates.io/crates/serde
[serde: rustc 1.31+]: https://img.shields.io/badge/serde-rustc_1.31+-lightgray.svg
[serde_derive: rustc 1.56+]: https://img.shields.io/badge/serde_derive-rustc_1.56+-lightgray.svg
[serde msrv]: https://img.shields.io/crates/msrv/serde.svg?label=serde%20msrv&color=lightgray
[serde_derive msrv]: https://img.shields.io/crates/msrv/serde_derive.svg?label=serde_derive%20msrv&color=lightgray
[Rust 1.31]: https://blog.rust-lang.org/2018/12/06/Rust-1.31-and-rust-2018.html
[Rust 1.56]: https://blog.rust-lang.org/2021/10/21/Rust-1.56.0.html
[Rust 1.61]: https://blog.rust-lang.org/2022/05/19/Rust-1.61.0.html

**Serde is a framework for *ser*ializing and *de*serializing Rust data structures efficiently and generically.**

Expand Down
4 changes: 2 additions & 2 deletions crates-io.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ fn main() {
Serde is one of the most widely used Rust libraries so any place that Rustaceans
congregate will be able to help you out. For chat, consider trying the
[#rust-questions] or [#rust-beginners] channels of the unofficial community
Discord (invite: <https://discord.gg/rust-lang-community>, the [#rust-usage] or
[#beginners] channels of the official Rust Project Discord (invite:
Discord (invite: <https://discord.gg/rust-lang-community>), the [#rust-usage]
or [#beginners] channels of the official Rust Project Discord (invite:
<https://discord.gg/rust-lang>), or the [#general][zulip] stream in Zulip. For
asynchronous, consider the [\[rust\] tag on StackOverflow][stackoverflow], the
[/r/rust] subreddit which has a pinned weekly easy questions post, or the Rust
Expand Down
16 changes: 9 additions & 7 deletions serde/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "serde"
version = "1.0.188" # remember to update html_root_url and serde_derive dependency
version = "1.0.218"
authors = ["Erick Tryzelaar <[email protected]>", "David Tolnay <[email protected]>"]
build = "build.rs"
categories = ["encoding", "no-std", "no-std::no-alloc"]
Expand All @@ -20,24 +20,26 @@ serde_derive = { version = "1", optional = true, path = "../serde_derive" }
[dev-dependencies]
serde_derive = { version = "1", path = "../serde_derive" }

[lib]
doc-scrape-examples = false

[package.metadata.playground]
features = ["derive", "rc"]

[package.metadata.docs.rs]
features = ["derive"]
features = ["derive", "rc", "unstable"]
targets = ["x86_64-unknown-linux-gnu"]
rustdoc-args = ["--generate-link-to-definition"]
rustdoc-args = [
"--generate-link-to-definition",
"--extern-html-root-url=core=https://doc.rust-lang.org",
"--extern-html-root-url=alloc=https://doc.rust-lang.org",
"--extern-html-root-url=std=https://doc.rust-lang.org",
]

# This cfg cannot be enabled, but it still forces Cargo to keep serde_derive's
# version in lockstep with serde's, even if someone depends on the two crates
# separately with serde's "derive" feature disabled. Every serde_derive release
# is compatible with exactly one serde release because the generated code
# involves nonpublic APIs which are not bound by semver.
[target.'cfg(any())'.dependencies]
serde_derive = { version = "=1.0.188", path = "../serde_derive" }
serde_derive = { version = "=1.0.218", path = "../serde_derive" }


### FEATURES #################################################################
Expand Down
79 changes: 54 additions & 25 deletions serde/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::env;
use std::process::Command;
use std::str::{self, FromStr};
use std::str;

// The rustc-cfg strings below are *not* public API. Please let us know by
// opening a GitHub issue if your build environment requires some way to enable
Expand All @@ -13,6 +13,23 @@ fn main() {
None => return,
};

if minor >= 77 {
println!("cargo:rustc-check-cfg=cfg(no_core_cstr)");
println!("cargo:rustc-check-cfg=cfg(no_core_error)");
println!("cargo:rustc-check-cfg=cfg(no_core_net)");
println!("cargo:rustc-check-cfg=cfg(no_core_num_saturating)");
println!("cargo:rustc-check-cfg=cfg(no_core_try_from)");
println!("cargo:rustc-check-cfg=cfg(no_diagnostic_namespace)");
println!("cargo:rustc-check-cfg=cfg(no_float_copysign)");
println!("cargo:rustc-check-cfg=cfg(no_num_nonzero_signed)");
println!("cargo:rustc-check-cfg=cfg(no_relaxed_trait_bounds)");
println!("cargo:rustc-check-cfg=cfg(no_serde_derive)");
println!("cargo:rustc-check-cfg=cfg(no_std_atomic)");
println!("cargo:rustc-check-cfg=cfg(no_std_atomic64)");
println!("cargo:rustc-check-cfg=cfg(no_systemtime_checked_add)");
println!("cargo:rustc-check-cfg=cfg(no_target_has_atomic)");
}

let target = env::var("TARGET").unwrap();
let emscripten = target == "asmjs-unknown-emscripten" || target == "wasm32-unknown-emscripten";

Expand All @@ -27,9 +44,10 @@ fn main() {
println!("cargo:rustc-cfg=no_relaxed_trait_bounds");
}

// Current minimum supported version of serde_derive crate is Rust 1.56.
if minor < 56 {
println!("cargo:rustc-cfg=no_serde_derive");
// f32::copysign and f64::copysign stabilized in Rust 1.35.
// https://blog.rust-lang.org/2019/05/23/Rust-1.35.0.html#copy-the-sign-of-a-floating-point-number-onto-another
if minor < 35 {
println!("cargo:rustc-cfg=no_float_copysign");
}

// Support for #[cfg(target_has_atomic = "...")] stabilized in Rust 1.60.
Expand All @@ -53,38 +71,49 @@ fn main() {
}
}

// Current minimum supported version of serde_derive crate is Rust 1.61.
if minor < 61 {
println!("cargo:rustc-cfg=no_serde_derive");
}

// Support for core::ffi::CStr and alloc::ffi::CString stabilized in Rust 1.64.
// https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html#c-compatible-ffi-types-in-core-and-alloc
if minor < 64 {
println!("cargo:rustc-cfg=no_core_cstr");
}
}

fn rustc_minor_version() -> Option<u32> {
let rustc = match env::var_os("RUSTC") {
Some(rustc) => rustc,
None => return None,
};
// Support for core::num::Saturating and std::num::Saturating stabilized in Rust 1.74
// https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html#stabilized-apis
if minor < 74 {
println!("cargo:rustc-cfg=no_core_num_saturating");
}

let output = match Command::new(rustc).arg("--version").output() {
Ok(output) => output,
Err(_) => return None,
};
// Support for core::net stabilized in Rust 1.77.
// https://blog.rust-lang.org/2024/03/21/Rust-1.77.0.html
if minor < 77 {
println!("cargo:rustc-cfg=no_core_net");
}

let version = match str::from_utf8(&output.stdout) {
Ok(version) => version,
Err(_) => return None,
};
// Support for the `#[diagnostic]` tool attribute namespace
// https://blog.rust-lang.org/2024/05/02/Rust-1.78.0.html#diagnostic-attributes
if minor < 78 {
println!("cargo:rustc-cfg=no_diagnostic_namespace");
}

// The Error trait became available in core in 1.81.
// https://blog.rust-lang.org/2024/09/05/Rust-1.81.0.html#coreerrorerror
if minor < 81 {
println!("cargo:rustc-cfg=no_core_error");
}
}

fn rustc_minor_version() -> Option<u32> {
let rustc = env::var_os("RUSTC")?;
let output = Command::new(rustc).arg("--version").output().ok()?;
let version = str::from_utf8(&output.stdout).ok()?;
let mut pieces = version.split('.');
if pieces.next() != Some("rustc 1") {
return None;
}

let next = match pieces.next() {
Some(next) => next,
None => return None,
};

u32::from_str(next).ok()
pieces.next()?.parse().ok()
}
Loading