From ded3527d2a42eac08eb1e49afb4b6c457639495b Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Mon, 5 Aug 2024 21:54:29 +0200 Subject: [PATCH] Fixup after rebase --- serde/Cargo.toml | 7 +++++-- serde_core/Cargo.toml | 2 +- serde_core/build.rs | 6 ++++++ serde_core/src/lib.rs | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/serde/Cargo.toml b/serde/Cargo.toml index d238ededc..26dbda872 100644 --- a/serde/Cargo.toml +++ b/serde/Cargo.toml @@ -1,7 +1,10 @@ [package] name = "serde" version = "1.0.204" -authors = ["Erick Tryzelaar ", "David Tolnay "] +authors = [ + "Erick Tryzelaar ", + "David Tolnay ", +] build = "build.rs" categories = ["encoding", "no-std", "no-std::no-alloc"] description = "A generic serialization/deserialization framework" @@ -16,7 +19,7 @@ rust-version = "1.31" [dependencies] serde_derive = { version = "1", optional = true, path = "../serde_derive" } -serde_core = { version = "=1.0.203", path = "../serde_core", default-features = false } +serde_core = { version = "=1.0.204", path = "../serde_core", default-features = false } [dev-dependencies] serde_derive = { version = "1", path = "../serde_derive" } diff --git a/serde_core/Cargo.toml b/serde_core/Cargo.toml index c54d5f723..31cd21733 100644 --- a/serde_core/Cargo.toml +++ b/serde_core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "serde_core" -version = "1.0.203" # remember to update html_root_url and serde_derive dependency +version = "1.0.204" # remember to update html_root_url and serde_derive dependency authors = [ "Erick Tryzelaar ", "David Tolnay ", diff --git a/serde_core/build.rs b/serde_core/build.rs index 46ca435d5..aff0eba67 100644 --- a/serde_core/build.rs +++ b/serde_core/build.rs @@ -17,6 +17,7 @@ fn main() { println!("cargo:rustc-check-cfg=cfg(no_core_cstr)"); 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)"); @@ -84,6 +85,11 @@ fn main() { if minor < 74 { println!("cargo:rustc-cfg=no_core_num_saturating"); } + // 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"); + } } fn rustc_minor_version() -> Option { diff --git a/serde_core/src/lib.rs b/serde_core/src/lib.rs index 4a9ff6db4..62784bdf1 100644 --- a/serde_core/src/lib.rs +++ b/serde_core/src/lib.rs @@ -15,7 +15,7 @@ //////////////////////////////////////////////////////////////////////////////// // Serde types in rustdoc of other crates get linked to here. -#![doc(html_root_url = "https://docs.rs/serde/1.0.203")] +#![doc(html_root_url = "https://docs.rs/serde/1.0.204")] // Support using Serde without the standard library! #![cfg_attr(not(feature = "std"), no_std)] // Show which crate feature enables conditionally compiled APIs in documentation.