about summary refs log tree commit diff
path: root/compiler/rustc_span
diff options
context:
space:
mode:
authorklensy <klensy@users.noreply.github.com>2022-07-03 19:18:53 +0300
committerklensy <klensy@users.noreply.github.com>2022-08-15 17:56:37 +0300
commitadba4691f6577b35b2d48ebbe6c8e993eea09978 (patch)
treef74e9751ed77a685ccf84fae933dbdf3b88108a6 /compiler/rustc_span
parent801821d1560f84e4716fcbd9244ec959320a13d5 (diff)
downloadrust-adba4691f6577b35b2d48ebbe6c8e993eea09978.tar.gz
rust-adba4691f6577b35b2d48ebbe6c8e993eea09978.zip
cache strings while encoding/decoding to compiler artifacts
Diffstat (limited to 'compiler/rustc_span')
-rw-r--r--compiler/rustc_span/src/symbol.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index 2f3519e3edd..156f53ac486 100644
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
@@ -1852,14 +1852,14 @@ impl fmt::Display for Symbol {
 }
 
 impl<S: Encoder> Encodable<S> for Symbol {
-    fn encode(&self, s: &mut S) {
+    default fn encode(&self, s: &mut S) {
         s.emit_str(self.as_str());
     }
 }
 
 impl<D: Decoder> Decodable<D> for Symbol {
     #[inline]
-    fn decode(d: &mut D) -> Symbol {
+    default fn decode(d: &mut D) -> Symbol {
         Symbol::intern(&d.read_str())
     }
 }