about summary refs log tree commit diff
path: root/src/librustc/metadata/tyencode.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc/metadata/tyencode.rs')
-rw-r--r--src/librustc/metadata/tyencode.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc/metadata/tyencode.rs b/src/librustc/metadata/tyencode.rs
index fd41d219b41..49b5d7b2864 100644
--- a/src/librustc/metadata/tyencode.rs
+++ b/src/librustc/metadata/tyencode.rs
@@ -35,7 +35,7 @@ macro_rules! mywrite( ($wr:expr, $($arg:tt)*) => (
 pub struct ctxt<'a> {
     pub diag: &'a SpanHandler,
     // Def -> str Callback:
-    pub ds: fn(DefId) -> ~str,
+    pub ds: fn(DefId) -> StrBuf,
     // The type context.
     pub tcx: &'a ty::ctxt,
     pub abbrevs: &'a abbrev_map
@@ -47,7 +47,7 @@ pub struct ctxt<'a> {
 pub struct ty_abbrev {
     pos: uint,
     len: uint,
-    s: ~str
+    s: StrBuf
 }
 
 pub type abbrev_map = RefCell<HashMap<ty::t, ty_abbrev>>;
@@ -77,7 +77,7 @@ pub fn enc_ty(w: &mut MemWriter, cx: &ctxt, t: ty::t) {
         cx.abbrevs.borrow_mut().insert(t, ty_abbrev {
             pos: pos as uint,
             len: len as uint,
-            s: format!("\\#{:x}:{:x}\\#", pos, len)
+            s: format_strbuf!("\\#{:x}:{:x}\\#", pos, len)
         });
     }
 }