]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #13440 : huonw/rust/strbuf, r=alexcrichton
authorbors <bors@rust-lang.org>
Fri, 11 Apr 2014 04:01:41 +0000 (21:01 -0700)
committerbors <bors@rust-lang.org>
Fri, 11 Apr 2014 04:01:41 +0000 (21:01 -0700)
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

17 files changed:
1  2 
src/compiletest/runtest.rs
src/libcollections/bitv.rs
src/libcollections/hashmap.rs
src/libgetopts/lib.rs
src/libglob/lib.rs
src/librustc/metadata/tydecode.rs
src/librustc/middle/resolve.rs
src/librustc/middle/trans/debuginfo.rs
src/librustc/middle/typeck/infer/error_reporting.rs
src/librustc/util/ppaux.rs
src/librustdoc/clean.rs
src/librustdoc/html/format.rs
src/librustdoc/html/render.rs
src/librustdoc/markdown.rs
src/libsyntax/ast_util.rs
src/libsyntax/parse/parser.rs
src/libsyntax/print/pprust.rs

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index e7b925197076aefb7cdb21916bea9228c29453bb,fec86b0bbe8e1a90ff86ecd38baa1c655693177a..0a9c6ee8e5c0fcda6cbe31eaa91d04529d4afe2a
@@@ -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(' ');
              }
          };
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge