Support no-default-features mode in Formatter's impl

This commit is contained in:
David Tolnay 2020-05-09 17:12:11 -07:00
parent 726ff5ed31
commit 99bc52f685
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -1003,4 +1003,11 @@ impl<'a, 'b> Serializer for &'a mut fmt::Formatter<'b> {
) -> Result<Self::SerializeStructVariant, fmt::Error> {
Err(fmt::Error)
}
fn collect_str<T: ?Sized>(self, value: &T) -> fmt::Result
where
T: Display,
{
Display::fmt(value, self)
}
}