about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/proc_macro/src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/library/proc_macro/src/lib.rs b/library/proc_macro/src/lib.rs
index 9ab5061c668..80f28a50296 100644
--- a/library/proc_macro/src/lib.rs
+++ b/library/proc_macro/src/lib.rs
@@ -1004,6 +1004,13 @@ impl Punct {
     }
 }
 
+#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
+impl ToString for Punct {
+    fn to_string(&self) -> String {
+        self.as_char().to_string()
+    }
+}
+
 /// Prints the punctuation character as a string that should be losslessly convertible
 /// back into the same character.
 #[stable(feature = "proc_macro_lib2", since = "1.29.0")]