From: bors Date: Fri, 11 Apr 2014 04:01:41 +0000 (-0700) Subject: auto merge of #13440 : huonw/rust/strbuf, r=alexcrichton X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=cea8def62068b405495ecd1810124ebc88b4f90b;p=rust.git auto merge of #13440 : huonw/rust/strbuf, r=alexcrichton libstd: Implement `StrBuf`, a new string buffer type like `Vec`, and port all code over to use it. Rebased & tests-fixed version of https://github.com/mozilla/rust/pull/13269 --- cea8def62068b405495ecd1810124ebc88b4f90b diff --cc src/librustc/util/ppaux.rs index e7b92519707,fec86b0bbe8..0a9c6ee8e5c --- a/src/librustc/util/ppaux.rs +++ b/src/librustc/util/ppaux.rs @@@ -258,15 -259,15 +259,15 @@@ pub fn ty_to_str(cx: &ctxt, typ: t) -> sig: &ty::FnSig) -> ~str { let mut s = if abi == abi::Rust { - ~"" + StrBuf::new() } else { - format!("extern {} ", abi.to_str()) + StrBuf::from_owned_str(format!("extern {} ", abi.to_str())) }; - match purity { - ast::ImpureFn => {} + match fn_style { + ast::NormalFn => {} _ => { - s.push_str(purity.to_str()); + s.push_str(fn_style.to_str()); s.push_char(' '); } };