about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-06-14 19:40:11 -0700
committerCorey Richardson <corey@octayn.net>2013-06-28 10:44:16 -0400
commit89eb9951958dc2cd652645cea5badf4bb9edc6f9 (patch)
treedc234db5e74b23cec4080026d8c316d88849e638
parent03ab6351ccc7b0e2b6102f88eddc0bbe84f2abc0 (diff)
downloadrust-89eb9951958dc2cd652645cea5badf4bb9edc6f9.tar.gz
rust-89eb9951958dc2cd652645cea5badf4bb9edc6f9.zip
librustc: Fix merge fallout.
-rw-r--r--src/librustc/metadata/encoder.rs2
-rw-r--r--src/librustc/middle/reachable.rs16
-rw-r--r--src/librustc/middle/resolve.rs6
-rw-r--r--src/librustc/middle/trans/asm.rs2
-rw-r--r--src/librustc/middle/trans/base.rs2
-rw-r--r--src/librustc/middle/trans/common.rs2
-rw-r--r--src/librustc/middle/typeck/check/mod.rs10
-rw-r--r--src/librustc/middle/typeck/check/regionck.rs19
-rw-r--r--src/libstd/path.rs2
-rw-r--r--src/libstd/str.rs6
-rw-r--r--src/libsyntax/ext/pipes/pipec.rs2
-rw-r--r--src/libsyntax/parse/parser.rs2
12 files changed, 34 insertions, 37 deletions
diff --git a/src/librustc/metadata/encoder.rs b/src/librustc/metadata/encoder.rs
index b1967752e45..5ff52b1859a 100644
--- a/src/librustc/metadata/encoder.rs
+++ b/src/librustc/metadata/encoder.rs
@@ -1155,7 +1155,7 @@ fn encode_info_for_items(ecx: &EncodeContext,
                                ast_map::path_to_str(
                                 *pt,
                                 token::get_ident_interner()),
-                               *token::ident_to_str(&ni.ident));
+                                token::ident_to_str(&ni.ident));
 
                         let mut ebml_w = copy ebml_w;
                         // See above
diff --git a/src/librustc/middle/reachable.rs b/src/librustc/middle/reachable.rs
index 1361f2c245a..106c1d85cd7 100644
--- a/src/librustc/middle/reachable.rs
+++ b/src/librustc/middle/reachable.rs
@@ -109,7 +109,7 @@ impl ReachableContext {
         let reachable_symbols = self.reachable_symbols;
         let worklist = self.worklist;
         let visitor = visit::mk_vt(@Visitor {
-            visit_item: |item, _, visitor| {
+            visit_item: |item, (_, visitor)| {
                 match item.node {
                     item_fn(*) => {
                         reachable_symbols.insert(item.id);
@@ -184,13 +184,13 @@ impl ReachableContext {
                 }
 
                 if item.vis == public {
-                    visit::visit_item(item, (), visitor)
+                    visit::visit_item(item, ((), visitor))
                 }
             },
             .. *visit::default_visitor()
         });
 
-        visit::visit_crate(crate, (), visitor)
+        visit::visit_crate(crate, ((), visitor))
     }
 
     // Returns true if the given def ID represents a local item that is
@@ -256,7 +256,7 @@ impl ReachableContext {
         let (worklist, method_map) = (self.worklist, self.method_map);
         let (tcx, reachable_symbols) = (self.tcx, self.reachable_symbols);
         visit::mk_vt(@visit::Visitor {
-            visit_expr: |expr, _, visitor| {
+            visit_expr: |expr, (_, visitor)| {
                 match expr.node {
                     expr_path(_) => {
                         let def = match tcx.def_map.find(&expr.id) {
@@ -300,7 +300,7 @@ impl ReachableContext {
                     _ => {}
                 }
 
-                visit::visit_expr(expr, (), visitor)
+                visit::visit_expr(expr, ((), visitor))
             },
             ..*visit::default_visitor()
         })
@@ -325,7 +325,7 @@ impl ReachableContext {
                 Some(&ast_map::node_item(item, _)) => {
                     match item.node {
                         item_fn(_, _, _, _, ref search_block) => {
-                            visit::visit_block(search_block, (), visitor)
+                            visit::visit_block(search_block, ((), visitor))
                         }
                         _ => {
                             self.tcx.sess.span_bug(item.span,
@@ -342,12 +342,12 @@ impl ReachableContext {
                                                     worklist?!")
                         }
                         provided(ref method) => {
-                            visit::visit_block(&method.body, (), visitor)
+                            visit::visit_block(&method.body, ((), visitor))
                         }
                     }
                 }
                 Some(&ast_map::node_method(ref method, _, _)) => {
-                    visit::visit_block(&method.body, (), visitor)
+                    visit::visit_block(&method.body, ((), visitor))
                 }
                 Some(_) => {
                     let ident_interner = token::get_ident_interner();
diff --git a/src/librustc/middle/resolve.rs b/src/librustc/middle/resolve.rs
index 224cf7c32a8..7cf13c671b2 100644
--- a/src/librustc/middle/resolve.rs
+++ b/src/librustc/middle/resolve.rs
@@ -1299,7 +1299,7 @@ impl Resolver {
             }
 
             item_impl(_, Some(_), ty, ref methods) => {
-                visit_item(item, parent, visitor);
+                visit_item(item, (parent, visitor));
             }
 
             item_trait(_, _, ref methods) => {
@@ -1349,7 +1349,7 @@ impl Resolver {
                     match ty_m.explicit_self.node {
                         sty_static => {}
                         _ => {
-                            method_names.insert(ident);
+                            method_names.insert(ident, ());
                         }
                     }
                 }
@@ -2054,7 +2054,7 @@ impl Resolver {
             } else {
                 result.push_str("::")
             }
-            result.push_str(*self.session.str_of(*ident));
+            result.push_str(self.session.str_of(*ident));
         };
         return result;
     }
diff --git a/src/librustc/middle/trans/asm.rs b/src/librustc/middle/trans/asm.rs
index b208592d113..a1d1b737f31 100644
--- a/src/librustc/middle/trans/asm.rs
+++ b/src/librustc/middle/trans/asm.rs
@@ -98,7 +98,7 @@ pub fn trans_inline_asm(bcx: block, ia: &ast::inline_asm) -> block {
     if !ia.clobbers.is_empty() && !clobbers.is_empty() {
         clobbers = fmt!("%s,%s", ia.clobbers, clobbers);
     } else {
-        clobbers.push_str(*ia.clobbers);
+        clobbers.push_str(ia.clobbers);
     };
 
     // Add the clobbers to our constraints list
diff --git a/src/librustc/middle/trans/base.rs b/src/librustc/middle/trans/base.rs
index 53d0118aa0e..661b19480e0 100644
--- a/src/librustc/middle/trans/base.rs
+++ b/src/librustc/middle/trans/base.rs
@@ -2890,7 +2890,7 @@ pub fn trans_crate(sess: session::Session,
                    emap2: resolve::ExportMap2,
                    reachable_map: @mut HashSet<ast::node_id>,
                    maps: astencode::Maps)
-                   -> (ContextRef, ModuleRef, LinkMeta) {
+                   -> (ModuleRef, LinkMeta) {
 
     let mut symbol_hasher = hash::default_state();
     let link_meta = link::build_link_meta(sess, crate, output, &mut symbol_hasher);
diff --git a/src/librustc/middle/trans/common.rs b/src/librustc/middle/trans/common.rs
index 94a314862cb..04bce4c02a8 100644
--- a/src/librustc/middle/trans/common.rs
+++ b/src/librustc/middle/trans/common.rs
@@ -1046,7 +1046,7 @@ pub fn path_str(sess: session::Session, p: &[path_elt]) -> ~str {
                 } else {
                     r.push_str("::")
                 }
-                r.push_str(*sess.str_of(s));
+                r.push_str(sess.str_of(s));
             }
         }
     }
diff --git a/src/librustc/middle/typeck/check/mod.rs b/src/librustc/middle/typeck/check/mod.rs
index b4a710e15b8..d224d182950 100644
--- a/src/librustc/middle/typeck/check/mod.rs
+++ b/src/librustc/middle/typeck/check/mod.rs
@@ -799,9 +799,8 @@ impl FnCtxt {
         match self.inh.node_types.find(&ex.id) {
             Some(&t) => t,
             None => {
-                self.tcx().sess.bug(
-                    fmt!("no type for %s in fcx %s",
-                         self.expr_to_str(ex), self.tag()));
+                self.tcx().sess.bug(fmt!("no type for expr in fcx %s",
+                                         self.tag()));
             }
         }
     }
@@ -1141,7 +1140,7 @@ pub fn check_expr_with_unifier(fcx: @mut FnCtxt,
                                expr: @ast::expr,
                                expected: Option<ty::t>,
                                unifier: &fn()) {
-    debug!(">> typechecking %s", fcx.expr_to_str(expr));
+    debug!(">> typechecking");
 
     fn check_method_argument_types(
         fcx: @mut FnCtxt,
@@ -1730,8 +1729,7 @@ pub fn check_expr_with_unifier(fcx: @mut FnCtxt,
             ty::mk_closure(tcx, fn_ty_copy)
         };
 
-        debug!("check_expr_fn_with_unifier %s fty=%s",
-               fcx.expr_to_str(expr),
+        debug!("check_expr_fn_with_unifier fty=%s",
                fcx.infcx().ty_to_str(fty));
 
         fcx.write_ty(expr.id, fty);
diff --git a/src/librustc/middle/typeck/check/regionck.rs b/src/librustc/middle/typeck/check/regionck.rs
index 69d4d82d15f..df81ebd48aa 100644
--- a/src/librustc/middle/typeck/check/regionck.rs
+++ b/src/librustc/middle/typeck/check/regionck.rs
@@ -230,7 +230,7 @@ fn constrain_bindings_in_pat(pat: @ast::pat, rcx: @mut Rcx) {
 }
 
 fn visit_expr(expr: @ast::expr, (rcx, v): (@mut Rcx, rvt)) {
-    debug!("regionck::visit_expr(e=%s)", rcx.fcx.expr_to_str(expr));
+    debug!("regionck::visit_expr(e=?)");
 
     let has_method_map = rcx.fcx.inh.method_map.contains_key(&expr.id);
 
@@ -520,8 +520,7 @@ fn constrain_derefs(rcx: @mut Rcx,
     let tcx = rcx.fcx.tcx();
     let r_deref_expr = ty::re_scope(deref_expr.id);
     for uint::range(0, derefs) |i| {
-        debug!("constrain_derefs(deref_expr=%s, derefd_ty=%s, derefs=%?/%?",
-               rcx.fcx.expr_to_str(deref_expr),
+        debug!("constrain_derefs(deref_expr=?, derefd_ty=%s, derefs=%?/%?",
                rcx.fcx.infcx().ty_to_str(derefd_ty),
                i, derefs);
 
@@ -576,8 +575,7 @@ fn constrain_index(rcx: @mut Rcx,
 
     let tcx = rcx.fcx.tcx();
 
-    debug!("constrain_index(index_expr=%s, indexed_ty=%s",
-           rcx.fcx.expr_to_str(index_expr),
+    debug!("constrain_index(index_expr=?, indexed_ty=%s",
            rcx.fcx.infcx().ty_to_str(indexed_ty));
 
     let r_index_expr = ty::re_scope(index_expr.id);
@@ -808,7 +806,7 @@ pub mod guarantor {
          * to the lifetime of its guarantor (if any).
          */
 
-        debug!("guarantor::for_addr_of(base=%s)", rcx.fcx.expr_to_str(base));
+        debug!("guarantor::for_addr_of(base=?)");
 
         let guarantor = guarantor(rcx, base);
         link(rcx, expr.span, expr.id, guarantor);
@@ -842,8 +840,7 @@ pub mod guarantor {
          * region pointers.
          */
 
-        debug!("guarantor::for_autoref(expr=%s, autoref=%?)",
-               rcx.fcx.expr_to_str(expr), autoref);
+        debug!("guarantor::for_autoref(autoref=%?)", autoref);
 
         let mut expr_ct = categorize_unadjusted(rcx, expr);
         debug!("    unadjusted cat=%?", expr_ct.cat);
@@ -970,7 +967,7 @@ pub mod guarantor {
          * `&expr`).
          */
 
-        debug!("guarantor(expr=%s)", rcx.fcx.expr_to_str(expr));
+        debug!("guarantor()");
         match expr.node {
             ast::expr_unary(_, ast::deref, b) => {
                 let cat = categorize(rcx, b);
@@ -1034,7 +1031,7 @@ pub mod guarantor {
     }
 
     fn categorize(rcx: @mut Rcx, expr: @ast::expr) -> ExprCategorization {
-        debug!("categorize(expr=%s)", rcx.fcx.expr_to_str(expr));
+        debug!("categorize()");
 
         let mut expr_ct = categorize_unadjusted(rcx, expr);
         debug!("before adjustments, cat=%?", expr_ct.cat);
@@ -1086,7 +1083,7 @@ pub mod guarantor {
     fn categorize_unadjusted(rcx: @mut Rcx,
                              expr: @ast::expr)
                           -> ExprCategorizationType {
-        debug!("categorize_unadjusted(expr=%s)", rcx.fcx.expr_to_str(expr));
+        debug!("categorize_unadjusted()");
 
         let guarantor = {
             if rcx.fcx.inh.method_map.contains_key(&expr.id) {
diff --git a/src/libstd/path.rs b/src/libstd/path.rs
index b3b696a9a60..9b4a3270f28 100644
--- a/src/libstd/path.rs
+++ b/src/libstd/path.rs
@@ -21,7 +21,7 @@ use cmp::Eq;
 use iterator::IteratorUtil;
 use libc;
 use option::{None, Option, Some};
-use str::{Str, StrSlice, StrVector};
+use str::{OwnedStr, Str, StrSlice, StrVector};
 use str;
 use to_str::ToStr;
 use ascii::{AsciiCast, AsciiStr};
diff --git a/src/libstd/str.rs b/src/libstd/str.rs
index 9c94f36fba3..3c512d9bfd2 100644
--- a/src/libstd/str.rs
+++ b/src/libstd/str.rs
@@ -1427,7 +1427,8 @@ impl<'self> StrSlice<'self> for &'self str {
     fn slice_chars(&self, begin: uint, end: uint) -> &'self str {
         assert!(begin <= end);
         // not sure how to use the iterators for this nicely.
-        let mut (position, count) = (0, 0);
+        let mut position = 0;
+        let mut count = 0;
         let l = self.len();
         while count < begin && position < l {
             position = self.char_range_at(position).next;
@@ -1575,7 +1576,8 @@ impl<'self> StrSlice<'self> for &'self str {
      * The original string with all occurances of `from` replaced with `to`
      */
     pub fn replace(&self, from: &str, to: &str) -> ~str {
-        let mut (result, last_end) = (~"", 0);
+        let mut result = ~"";
+        let mut last_end = 0;
         for self.matches_index_iter(from).advance |(start, end)| {
             result.push_str(unsafe{raw::slice_bytes(*self, last_end, start)});
             result.push_str(to);
diff --git a/src/libsyntax/ext/pipes/pipec.rs b/src/libsyntax/ext/pipes/pipec.rs
index 8e1276d52d1..3044cd50b34 100644
--- a/src/libsyntax/ext/pipes/pipec.rs
+++ b/src/libsyntax/ext/pipes/pipec.rs
@@ -98,7 +98,7 @@ impl gen_send for message {
             }
             body.push_str(fmt!("let message = %s(%s);\n",
                                 name,
-                                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 {
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 64bdfd4a4d3..f1b5c4d16be 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -378,7 +378,7 @@ impl Parser {
             self.fatal(
                 fmt!(
                     "expected `%s`, found `%s`",
-                    *self.id_to_str(kw.to_ident()),
+                    self.id_to_str(kw.to_ident()).to_str(),
                     self.this_token_to_str()
                 )
             );