diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs index 0378ff5362a8b..fa5757a0b1138 100644 --- a/src/liballoc/string.rs +++ b/src/liballoc/string.rs @@ -2228,6 +2228,14 @@ impl ToString for T { } } +#[stable(feature = "char_to_string_specialization", since = "1.46.0")] +impl ToString for char { + #[inline] + fn to_string(&self) -> String { + String::from(self.encode_utf8(&mut [0; 4])) + } +} + #[stable(feature = "str_to_string_specialization", since = "1.9.0")] impl ToString for str { #[inline]