diff --git a/serde/src/ser/mod.rs b/serde/src/ser/mod.rs index f69ab635..e12e5998 100644 --- a/serde/src/ser/mod.rs +++ b/serde/src/ser/mod.rs @@ -638,7 +638,7 @@ pub trait Serializer: Sized { /// /// The default implementation returns an error unconditionally. #[cfg(not(any(feature = "std", feature = "collections")))] - fn collect_str(self, _value: &T) -> Result + fn collect_str(self, _value: &T) -> Result where T: Display, { Err(Error::custom("Default impl of collect_str errors out for no_std builds"))