diff --git a/serde/src/de/mod.rs b/serde/src/de/mod.rs index f4e5c1d8..64f6c51b 100644 --- a/serde/src/de/mod.rs +++ b/serde/src/de/mod.rs @@ -886,6 +886,9 @@ pub trait Deserializer<'de>: Sized { serde_if_integer128! { /// Hint that the `Deserialize` type is expecting an `i128` value. + /// + /// This method is available only on Rust compiler versions >=1.26. The + /// default behavior unconditionally returns an error. fn deserialize_i128(self, visitor: V) -> Result where V: Visitor<'de> @@ -917,6 +920,9 @@ pub trait Deserializer<'de>: Sized { serde_if_integer128! { /// Hint that the `Deserialize` type is expecting an `u128` value. + /// + /// This method is available only on Rust compiler versions >=1.26. The + /// default behavior unconditionally returns an error. fn deserialize_u128(self, visitor: V) -> Result where V: Visitor<'de> @@ -1275,7 +1281,8 @@ pub trait Visitor<'de>: Sized { serde_if_integer128! { /// The input contains a `i128`. /// - /// The default implementation fails with a type error. + /// This method is available only on Rust compiler versions >=1.26. The + /// default implementation fails with a type error. fn visit_i128(self, v: i128) -> Result where E: Error, @@ -1334,7 +1341,8 @@ pub trait Visitor<'de>: Sized { serde_if_integer128! { /// The input contains a `u128`. /// - /// The default implementation fails with a type error. + /// This method is available only on Rust compiler versions >=1.26. The + /// default implementation fails with a type error. fn visit_u128(self, v: u128) -> Result where E: Error, diff --git a/serde/src/ser/mod.rs b/serde/src/ser/mod.rs index 2833a676..a5538d31 100644 --- a/serde/src/ser/mod.rs +++ b/serde/src/ser/mod.rs @@ -514,6 +514,9 @@ pub trait Serializer: Sized { /// # /// # fn main() {} /// ``` + /// + /// This method is available only on Rust compiler versions >=1.26. The + /// default behavior unconditionally returns an error. fn serialize_i128(self, v: i128) -> Result { let _ = v; Err(Error::custom("i128 is not supported")) @@ -646,6 +649,9 @@ pub trait Serializer: Sized { /// # /// # fn main() {} /// ``` + /// + /// This method is available only on Rust compiler versions >=1.26. The + /// default behavior unconditionally returns an error. fn serialize_u128(self, v: u128) -> Result { let _ = v; Err(Error::custom("u128 is not supported"))