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).
This commit is contained in:
David Tolnay
2025-09-13 09:34:08 -07:00
parent 1b89ff50a9
commit 3c747e4585
2 changed files with 8 additions and 8 deletions
-8
View File
@@ -34,14 +34,6 @@ rustdoc-args = [
"--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.219", path = "../serde_derive" }
### FEATURES #################################################################
+8
View File
@@ -29,6 +29,14 @@ rustdoc-args = [
"--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.219", path = "../serde_derive" }
### FEATURES #################################################################