about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2013-06-10 23:25:25 +1000
committerHuon Wilson <dbau.pp+github@gmail.com>2013-06-10 23:57:03 +1000
commitccd0ac59e9a918f3c2a174e31213286dc6867d37 (patch)
tree613e9e26394be216bfb2dc56dba0391ca6486545 /src/libsyntax
parent5a711ea7c317ea90f03d5118dbb2e19e1622bc29 (diff)
downloadrust-ccd0ac59e9a918f3c2a174e31213286dc6867d37.tar.gz
rust-ccd0ac59e9a918f3c2a174e31213286dc6867d37.zip
std: remove str::{connect,concat}*.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/abi.rs3
-rw-r--r--src/libsyntax/ast_map.rs2
-rw-r--r--src/libsyntax/ast_util.rs2
-rw-r--r--src/libsyntax/ext/asm.rs2
-rw-r--r--src/libsyntax/ext/pipes/liveness.rs2
-rw-r--r--src/libsyntax/ext/pipes/pipec.rs10
-rw-r--r--src/libsyntax/ext/quote.rs4
-rw-r--r--src/libsyntax/ext/source_util.rs4
-rw-r--r--src/libsyntax/ext/tt/macro_parser.rs2
-rw-r--r--src/libsyntax/parse/comments.rs2
-rw-r--r--src/libsyntax/parse/parser.rs4
11 files changed, 15 insertions, 22 deletions
diff --git a/src/libsyntax/abi.rs b/src/libsyntax/abi.rs
index 75439dfaa78..53729dbd115 100644
--- a/src/libsyntax/abi.rs
+++ b/src/libsyntax/abi.rs
@@ -10,7 +10,6 @@
 
 use core::prelude::*;
 
-use core::str;
 use core::to_bytes;
 
 #[deriving(Eq)]
@@ -267,7 +266,7 @@ impl ToStr for AbiSet {
         for self.each |abi| {
             strs.push(abi.data().name);
         }
-        fmt!("\"%s\"", str::connect_slices(strs, " "))
+        fmt!("\"%s\"", strs.connect(" "))
     }
 }
 
diff --git a/src/libsyntax/ast_map.rs b/src/libsyntax/ast_map.rs
index fecded5e87b..8a379a6213a 100644
--- a/src/libsyntax/ast_map.rs
+++ b/src/libsyntax/ast_map.rs
@@ -62,7 +62,7 @@ pub fn path_to_str_with_sep(p: &[path_elt], sep: &str, itr: @ident_interner)
           path_name(s) => copy *itr.get(s.name)
         }
     };
-    str::connect(strs, sep)
+    strs.connect(sep)
 }
 
 pub fn path_ident_to_str(p: &path, i: ident, itr: @ident_interner) -> ~str {
diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs
index b040397de72..db7c29edab0 100644
--- a/src/libsyntax/ast_util.rs
+++ b/src/libsyntax/ast_util.rs
@@ -28,7 +28,7 @@ use core::to_bytes;
 
 pub fn path_name_i(idents: &[ident]) -> ~str {
     // FIXME: Bad copies (#2543 -- same for everything else that says "bad")
-    str::connect(idents.map(|i| copy *token::interner_get(i.name)), "::")
+    idents.map(|i| copy *token::interner_get(i.name)).connect("::")
 }
 
 pub fn path_to_ident(p: @Path) -> ident { copy *p.idents.last() }
diff --git a/src/libsyntax/ext/asm.rs b/src/libsyntax/ext/asm.rs
index 7f8f2be6f6e..14cbd170c48 100644
--- a/src/libsyntax/ext/asm.rs
+++ b/src/libsyntax/ext/asm.rs
@@ -120,7 +120,7 @@ pub fn expand_asm(cx: @ExtCtxt, sp: span, tts: &[ast::token_tree])
                     clobs.push(clob);
                 }
 
-                cons = str::connect(clobs, ",");
+                cons = clobs.connect(",");
             }
             Options => {
                 let option = p.parse_str();
diff --git a/src/libsyntax/ext/pipes/liveness.rs b/src/libsyntax/ext/pipes/liveness.rs
index 43bcb68b8e0..cb7386b9880 100644
--- a/src/libsyntax/ext/pipes/liveness.rs
+++ b/src/libsyntax/ext/pipes/liveness.rs
@@ -88,7 +88,7 @@ pub fn analyze(proto: @mut protocol_, _cx: @ExtCtxt) {
     }
 
     if self_live.len() > 0 {
-        let states = str::connect(self_live.map(|s| copy s.name), " ");
+        let states = self_live.map(|s| copy s.name).connect(" ");
 
         debug!("protocol %s is unbounded due to loops involving: %s",
                copy proto.name, states);
diff --git a/src/libsyntax/ext/pipes/pipec.rs b/src/libsyntax/ext/pipes/pipec.rs
index a5725613d58..304c496bbf4 100644
--- a/src/libsyntax/ext/pipes/pipec.rs
+++ b/src/libsyntax/ext/pipes/pipec.rs
@@ -24,7 +24,6 @@ use opt_vec;
 use opt_vec::OptVec;
 
 use core::iterator::IteratorUtil;
-use core::str;
 use core::vec;
 
 pub trait gen_send {
@@ -100,9 +99,9 @@ impl gen_send for message {
             }
             body += fmt!("let message = %s(%s);\n",
                          name,
-                         str::connect(vec::append_one(
-                           arg_names.map(|x| cx.str_of(*x)),
-                             ~"s"), ", "));
+                         vec::append_one(
+                             arg_names.map(|x| cx.str_of(*x)),
+                             ~"s").connect(", "));
 
             if !try {
                 body += fmt!("::std::pipes::send(pipe, message);\n");
@@ -155,8 +154,7 @@ impl gen_send for message {
                     ~""
                 }
                 else {
-                    ~"(" + str::connect(arg_names.map(|x| copy *x),
-                                        ", ") + ")"
+                    ~"(" + arg_names.map(|x| copy *x).connect(", ") + ")"
                 };
 
                 let mut body = ~"{ ";
diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs
index 09c9dd922c7..2c6f40091ac 100644
--- a/src/libsyntax/ext/quote.rs
+++ b/src/libsyntax/ext/quote.rs
@@ -92,7 +92,7 @@ pub mod rt {
 
     impl<'self> ToSource for &'self [@ast::item] {
         fn to_source(&self) -> ~str {
-            str::connect(self.map(|i| i.to_source()), "\n\n")
+            self.map(|i| i.to_source()).connect("\n\n")
         }
     }
 
@@ -104,7 +104,7 @@ pub mod rt {
 
     impl<'self> ToSource for &'self [@ast::Ty] {
         fn to_source(&self) -> ~str {
-            str::connect(self.map(|i| i.to_source()), ", ")
+            self.map(|i| i.to_source()).connect(", ")
         }
     }
 
diff --git a/src/libsyntax/ext/source_util.rs b/src/libsyntax/ext/source_util.rs
index 4d1e9a31821..79018ebd1ea 100644
--- a/src/libsyntax/ext/source_util.rs
+++ b/src/libsyntax/ext/source_util.rs
@@ -23,7 +23,6 @@ use print::pprust;
 
 use core::io;
 use core::result;
-use core::str;
 use core::vec;
 
 // These macros all relate to the file system; they either return
@@ -74,8 +73,7 @@ pub fn expand_mod(cx: @ExtCtxt, sp: span, tts: &[ast::token_tree])
     -> base::MacResult {
     base::check_zero_tts(cx, sp, tts, "module_path!");
     base::MRExpr(cx.expr_str(sp,
-                              str::connect(cx.mod_path().map(
-                                  |x| cx.str_of(*x)), "::")))
+                             cx.mod_path().map(|x| cx.str_of(*x)).connect("::")))
 }
 
 // include! : parse the given file as an expr
diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs
index a6ec91f899c..0c9ca98fb9d 100644
--- a/src/libsyntax/ext/tt/macro_parser.rs
+++ b/src/libsyntax/ext/tt/macro_parser.rs
@@ -371,7 +371,7 @@ pub fn parse(
         } else {
             if (bb_eis.len() > 0u && next_eis.len() > 0u)
                 || bb_eis.len() > 1u {
-                let nts = str::connect(vec::map(bb_eis, |ei| {
+                let nts = vec::map(bb_eis.connect(|ei| {
                     match ei.elts[ei.idx].node {
                       match_nonterminal(ref bind,ref name,_) => {
                         fmt!("%s ('%s')", *ident_to_str(name),
diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs
index 89fd5c3762a..a6933c16483 100644
--- a/src/libsyntax/parse/comments.rs
+++ b/src/libsyntax/parse/comments.rs
@@ -116,7 +116,7 @@ pub fn strip_doc_comment_decoration(comment: &str) -> ~str {
         let lines = block_trim(lines, ~"\t ", None);
         let lines = block_trim(lines, ~"*", Some(1u));
         let lines = block_trim(lines, ~"\t ", None);
-        return str::connect(lines, "\n");
+        return lines.connect("\n");
     }
 
     fail!("not a doc-comment: %s", comment);
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 3ff894c267b..03b4c0c5ca1 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -4002,9 +4002,7 @@ impl Parser {
                                 fmt!("illegal ABI: \
                                       expected one of [%s], \
                                       found `%s`",
-                                     str::connect_slices(
-                                         abi::all_names(),
-                                         ", "),
+                                     abi::all_names().connect(", "),
                                      word));
                         }
                     }