Compare commits

...

3 Commits

Author SHA1 Message Date
David Tolnay 0353354d61 Release 1.0.149 2022-12-04 23:11:59 -08:00
David Tolnay 34ae0422f4 Merge pull request #2333 from jonasbb/remove-trait-bounds
Remove some Serialize trait bounds
2022-12-03 09:22:27 -08:00
Jonas Bushart cc128feb4c Remove some Serialize trait bounds
Containers for the most part do not have any trait requirements for
iterating over them. So these bounds are unnecessary when Serializing
only.

This relaxation is part of Rust 1.34
2022-12-03 16:03:37 +01:00
8 changed files with 27 additions and 8 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "serde"
version = "1.0.148" # remember to update html_root_url and serde_derive dependency
version = "1.0.149" # remember to update html_root_url and serde_derive dependency
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
build = "build.rs"
categories = ["encoding", "no-std"]
@@ -15,7 +15,7 @@ repository = "https://github.com/serde-rs/serde"
rust-version = "1.13"
[dependencies]
serde_derive = { version = "=1.0.148", optional = true, path = "../serde_derive" }
serde_derive = { version = "=1.0.149", optional = true, path = "../serde_derive" }
[dev-dependencies]
serde_derive = { version = "1.0", path = "../serde_derive" }
+1
View File
@@ -89,6 +89,7 @@ fn main() {
println!("cargo:rustc-cfg=no_core_try_from");
println!("cargo:rustc-cfg=no_num_nonzero_signed");
println!("cargo:rustc-cfg=no_systemtime_checked_add");
println!("cargo:rustc-cfg=no_relaxed_trait_bounds");
}
// Whitelist of archs that support std::sync::atomic module. Ideally we
+1 -1
View File
@@ -81,7 +81,7 @@
////////////////////////////////////////////////////////////////////////////////
// Serde types in rustdoc of other crates get linked to here.
#![doc(html_root_url = "https://docs.rs/serde/1.0.148")]
#![doc(html_root_url = "https://docs.rs/serde/1.0.149")]
// Support using Serde without the standard library!
#![cfg_attr(not(feature = "std"), no_std)]
// Unstable functionality only if the user asks for it. For tracking and
+19 -1
View File
@@ -182,7 +182,25 @@ where
}
}
#[cfg(any(feature = "std", feature = "alloc"))]
#[cfg(all(any(feature = "std", feature = "alloc"), not(no_relaxed_trait_bounds)))]
macro_rules! seq_impl {
($ty:ident < T $(: $tbound1:ident $(+ $tbound2:ident)*)* $(, $typaram:ident : $bound:ident)* >) => {
impl<T $(, $typaram)*> Serialize for $ty<T $(, $typaram)*>
where
T: Serialize,
{
#[inline]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
serializer.collect_seq(self)
}
}
}
}
#[cfg(all(any(feature = "std", feature = "alloc"), no_relaxed_trait_bounds))]
macro_rules! seq_impl {
($ty:ident < T $(: $tbound1:ident $(+ $tbound2:ident)*)* $(, $typaram:ident : $bound:ident)* >) => {
impl<T $(, $typaram)*> Serialize for $ty<T $(, $typaram)*>
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "serde_derive"
version = "1.0.148" # remember to update html_root_url
version = "1.0.149" # remember to update html_root_url
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
categories = ["no-std"]
description = "Macros 1.1 implementation of #[derive(Serialize, Deserialize)]"
+1 -1
View File
@@ -13,7 +13,7 @@
//!
//! [https://serde.rs/derive.html]: https://serde.rs/derive.html
#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.148")]
#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.149")]
#![allow(unknown_lints, bare_trait_objects)]
// Ignored clippy lints
#![allow(
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "serde_test"
version = "1.0.148" # remember to update html_root_url
version = "1.0.149" # remember to update html_root_url
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
build = "build.rs"
categories = ["development-tools::testing"]
+1 -1
View File
@@ -144,7 +144,7 @@
//! # }
//! ```
#![doc(html_root_url = "https://docs.rs/serde_test/1.0.148")]
#![doc(html_root_url = "https://docs.rs/serde_test/1.0.149")]
#![cfg_attr(feature = "cargo-clippy", allow(renamed_and_removed_lints))]
// Ignored clippy lints
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, needless_doctest_main))]