4250 Commits

Author SHA1 Message Date
David Tolnay
6c316d7cb5
Release 1.0.223 v1.0.223 2025-09-14 13:20:31 -07:00
David Tolnay
a4ac0c2bc6
Merge pull request #2978 from dtolnay/htmlrooturl
Change serde_core's html_root_url to docs.rs/serde_core
2025-09-14 13:19:52 -07:00
David Tolnay
ed76364f87
Change serde_core's html_root_url to docs.rs/serde_core 2025-09-14 12:54:38 -07:00
David Tolnay
57e21a1afa
Release 1.0.222 v1.0.222 2025-09-14 11:09:08 -07:00
David Tolnay
bb58726133
Merge pull request #2950 from aytey/fix_lifetime_issue_2024
Fix temporary value lifetime in `serialize_struct`
2025-09-14 11:08:16 -07:00
David Tolnay
3f6925125b
Delete unneeded field of MapDeserializer 2025-09-14 08:39:57 -07:00
David Tolnay
fd4decf2fe
Merge pull request #2976 from dtolnay/content
Move Content's Deserialize impl from serde_core to serde
2025-09-14 08:39:46 -07:00
David Tolnay
00b1b6b2b5
Move Content's Deserialize impl from serde_core to serde 2025-09-14 08:35:53 -07:00
David Tolnay
cf141aa8c7
Move Content's Clone impl from serde_core to serde 2025-09-14 08:35:32 -07:00
David Tolnay
ff3aee490a
Release 1.0.221 v1.0.221 2025-09-13 17:25:20 -07:00
David Tolnay
10bcfc0047
Merge pull request #2975 from dtolnay/integer128
Deprecate serde_if_integer128 macro
2025-09-13 17:25:14 -07:00
David Tolnay
2f03899197
Deprecate serde_if_integer128 macro 2025-09-13 17:19:10 -07:00
David Tolnay
3bea3b6989
Move serde_if_integer128 macro to serde 2025-09-13 17:12:58 -07:00
David Tolnay
85bf29c446
Merge pull request #2973 from dtolnay/timings
Illustrate build timings in serde_core readme
2025-09-13 17:12:51 -07:00
David Tolnay
900c922f41
Illustrate build timings in serde_core readme 2025-09-13 17:09:47 -07:00
David Tolnay
9cf3f2ed7d
Merge pull request #2974 from dtolnay/patchserdecore
Patch serde_core at workspace level
2025-09-13 17:04:36 -07:00
David Tolnay
1ffbeb9516
Patch serde_core at workspace level 2025-09-13 16:59:44 -07:00
David Tolnay
1051c5e6b7
Enforce trybuild >= 1.0.108
Older versions produce slightly differently normalized output
when run against 1.90.0+ Rust compiler.
2025-09-13 14:49:14 -07:00
David Tolnay
be255d62c8
Release 1.0.220 v1.0.220 2025-09-13 14:45:43 -07:00
David Tolnay
263a1dbdd7
Link to serde.rs without trailing slash 2025-09-13 14:40:22 -07:00
David Tolnay
23dea60e1a
Merge pull request #2971 from dtolnay/serdecoreci
Add CI coverage of serde_core
2025-09-13 14:40:13 -07:00
David Tolnay
690785f129
Add CI coverage of serde_core 2025-09-13 14:36:11 -07:00
David Tolnay
69aa109fd3
Merge pull request #2970 from dtolnay/coredoctest
Fix serde_core doc tests
2025-09-13 14:36:00 -07:00
David Tolnay
6bea2e04e4
Move doc helper macros to serde_core 2025-09-13 14:32:21 -07:00
David Tolnay
a1a82c3c55
Replace serde_core::* glob export 2025-09-13 14:32:21 -07:00
David Tolnay
7987ad700e
Fix serde_core doc tests 2025-09-13 14:32:21 -07:00
David Tolnay
0990d97a77
Merge pull request #2969 from dtolnay/coreprivate
Reduce visibility of serde_core implementation details
2025-09-13 14:32:12 -07:00
David Tolnay
a9150aad74
Make serde_core::Result private 2025-09-13 14:29:23 -07:00
David Tolnay
5ac3d84d99
Make InPlaceSeed private 2025-09-13 14:29:23 -07:00
David Tolnay
f916ec6baa
Make size_hint private 2025-09-13 14:29:22 -07:00
David Tolnay
7f831225a9
Make from_utf8_lossy private 2025-09-13 14:29:01 -07:00
David Tolnay
a16893429b
Make module for Content-related private code 2025-09-13 14:26:58 -07:00
David Tolnay
260511d149
Merge pull request #2968 from dtolnay/deserializecontent
Restore `__deserialize_content` optimization
2025-09-13 14:26:50 -07:00
David Tolnay
7659fb686d
Inline SeqDeserializer and MapDeserializer for Content
Greatly shrinks symbol sizes: keep all those generic type parameters
(and even closures) out of symbol names. A good change even independent
of serde_core.
2025-09-13 14:22:33 -07:00
David Tolnay
f669f16127
Restore __deserialize_content optimization 2025-09-13 14:22:33 -07:00
David Tolnay
93f43cedaa
Merge pull request #2967 from dtolnay/tricfg
Specify the cfg in which `tri!` is used
2025-09-13 14:22:25 -07:00
David Tolnay
b6c7ce8ec3
Specify the cfg in which 'tri!' is used 2025-09-13 14:19:07 -07:00
David Tolnay
35c963101b
Merge pull request #2966 from dtolnay/noserdecore
Enforce derive cannot be used against serde_core
2025-09-13 14:19:01 -07:00
David Tolnay
8909fc0c60
Enforce derive cannot be used against serde_core
Even for a simple data structure that would ordinarily expand to an impl
that only refers to the public Serde traits without serde::__private, we
still disallow a (renamed) serde_core dependency. This leaves the
liberty to new usage of private helpers in such impls over time. For
example, similar to the optimization of the standard library's
derive(Debug) that introduced debug_struct_field1_finish to improve
compile time of derived impls.
2025-09-13 14:15:44 -07:00
David Tolnay
3c747e4585
Relocate serde_derive version constraint from serde to serde_core
This disallows using an old version of serde_derive against a new
version of serde_core (with a rename to serde in Cargo.toml).
2025-09-13 14:15:44 -07:00
David Tolnay
1b89ff50a9
Merge pull request #2965 from dtolnay/enableresult
Forcibly enable serde_core/result when using serde
2025-09-13 14:15:38 -07:00
David Tolnay
c069b5c640
Forcibly enable serde_core/result when using serde
Making Result impls get disabled when using `serde = { version = "1",
default-features = false }` would have been a breaking change.
2025-09-13 14:11:44 -07:00
David Tolnay
79f3484ab8
Merge pull request #2964 from dtolnay/serdecoredoc
Update documentation of serde_core
2025-09-13 14:11:33 -07:00
David Tolnay
ac8b7ea052
Update serde_core package.description in Cargo.toml 2025-09-13 14:07:54 -07:00
David Tolnay
c1b2f43917
Tweak explanation of "result" feature 2025-09-13 14:07:54 -07:00
David Tolnay
51f8b0c52d
Rewrite serde_core readme 2025-09-13 14:07:53 -07:00
David Tolnay
6c4cae6b09
Point API documentation to docs.rs/serde 2025-09-13 14:07:53 -07:00
David Tolnay
4da055a286
Fix broken link in serde_core crates.io readme 2025-09-13 14:07:53 -07:00
David Tolnay
66c5d2b153
Merge pull request #2963 from dtolnay/diagnosticpath
Override diagnostic::on_unimplemented message for all serde_core traits
2025-09-13 14:07:43 -07:00
David Tolnay
4bddf1b953
Override diagnostic::on_unimplemented message of all serde_core traits
This prevents diagnostics being rendered like `serde_core::ser::Serialize`
and `serde_core:🇩🇪:Deserialize` in projects that have no direct
dependency on serde_core.

The attributes make error messages arguably sometimes worse than
pre-serde_core by always rendering `serde::Serialize` and never
`Serialize` when `use serde::Serialize` is in scope, which rustc's
default message construction knows to recognize. But this is probably
negligible.

I explored the alternative of setting `[lib] name = "serde"` in
serde_core/Cargo.toml which also prevents `serde_core::ser::Serialize`
in messages, but has the unwanted effect of also inserting the following
noise into every such error:

    note: there are multiple different versions of crate `serde` in the dependency graph
        --> $WORKSPACE/serde_core/src/ser/mod.rs:225:1
         |
     225 | pub trait Serialize {
         | ^^^^^^^^^^^^^^^^^^^ this is the required trait
         |
        ::: src/main.rs:1:1
         |
       1 | struct MyStruct;
         | --------------- this type doesn't implement the required trait
    ...
       4 |     let _ = serde_json::to_string(&MyStruct);
         |             ----------
         |             |
         |             one version of crate `serde` used here, as a dependency of crate `serde`
         |             one version of crate `serde` used here, as a dependency of crate `serde_json`
         |
        ::: $WORKSPACE/serde/src/private/de.rs:2347:1
         |
    2347 | pub trait IdentifierDeserializer<'de, E: Error> {
         | ----------------------------------------------- this is the found trait
         = help: you can use `cargo tree` to explore your dependency tree

The "this is the found trait" pointing to `IdentifierDeserializer` seems
like a compiler bug...
2025-09-13 13:59:52 -07:00