We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0da281b commit 298253aCopy full SHA for 298253a
compiler/rustc_span/src/symbol.rs
@@ -1901,6 +1901,13 @@ impl fmt::Display for Symbol {
1901
}
1902
1903
1904
+// takes advantage of `str::to_string` specialization
1905
+impl ToString for Symbol {
1906
+ fn to_string(&self) -> String {
1907
+ self.as_str().to_string()
1908
+ }
1909
+}
1910
+
1911
impl<S: Encoder> Encodable<S> for Symbol {
1912
default fn encode(&self, s: &mut S) {
1913
s.emit_str(self.as_str());
0 commit comments