Skip to content

Commit 89eb995

Browse files
pcwaltonemberian
authored andcommitted
librustc: Fix merge fallout.
1 parent 03ab635 commit 89eb995

File tree

12 files changed

+34
-37
lines changed

12 files changed

+34
-37
lines changed

src/librustc/metadata/encoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@ fn encode_info_for_items(ecx: &EncodeContext,
11551155
ast_map::path_to_str(
11561156
*pt,
11571157
token::get_ident_interner()),
1158-
*token::ident_to_str(&ni.ident));
1158+
token::ident_to_str(&ni.ident));
11591159

11601160
let mut ebml_w = copy ebml_w;
11611161
// See above

src/librustc/middle/reachable.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl ReachableContext {
109109
let reachable_symbols = self.reachable_symbols;
110110
let worklist = self.worklist;
111111
let visitor = visit::mk_vt(@Visitor {
112-
visit_item: |item, _, visitor| {
112+
visit_item: |item, (_, visitor)| {
113113
match item.node {
114114
item_fn(*) => {
115115
reachable_symbols.insert(item.id);
@@ -184,13 +184,13 @@ impl ReachableContext {
184184
}
185185

186186
if item.vis == public {
187-
visit::visit_item(item, (), visitor)
187+
visit::visit_item(item, ((), visitor))
188188
}
189189
},
190190
.. *visit::default_visitor()
191191
});
192192

193-
visit::visit_crate(crate, (), visitor)
193+
visit::visit_crate(crate, ((), visitor))
194194
}
195195

196196
// Returns true if the given def ID represents a local item that is
@@ -256,7 +256,7 @@ impl ReachableContext {
256256
let (worklist, method_map) = (self.worklist, self.method_map);
257257
let (tcx, reachable_symbols) = (self.tcx, self.reachable_symbols);
258258
visit::mk_vt(@visit::Visitor {
259-
visit_expr: |expr, _, visitor| {
259+
visit_expr: |expr, (_, visitor)| {
260260
match expr.node {
261261
expr_path(_) => {
262262
let def = match tcx.def_map.find(&expr.id) {
@@ -300,7 +300,7 @@ impl ReachableContext {
300300
_ => {}
301301
}
302302

303-
visit::visit_expr(expr, (), visitor)
303+
visit::visit_expr(expr, ((), visitor))
304304
},
305305
..*visit::default_visitor()
306306
})
@@ -325,7 +325,7 @@ impl ReachableContext {
325325
Some(&ast_map::node_item(item, _)) => {
326326
match item.node {
327327
item_fn(_, _, _, _, ref search_block) => {
328-
visit::visit_block(search_block, (), visitor)
328+
visit::visit_block(search_block, ((), visitor))
329329
}
330330
_ => {
331331
self.tcx.sess.span_bug(item.span,
@@ -342,12 +342,12 @@ impl ReachableContext {
342342
worklist?!")
343343
}
344344
provided(ref method) => {
345-
visit::visit_block(&method.body, (), visitor)
345+
visit::visit_block(&method.body, ((), visitor))
346346
}
347347
}
348348
}
349349
Some(&ast_map::node_method(ref method, _, _)) => {
350-
visit::visit_block(&method.body, (), visitor)
350+
visit::visit_block(&method.body, ((), visitor))
351351
}
352352
Some(_) => {
353353
let ident_interner = token::get_ident_interner();

src/librustc/middle/resolve.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,7 +1299,7 @@ impl Resolver {
12991299
}
13001300

13011301
item_impl(_, Some(_), ty, ref methods) => {
1302-
visit_item(item, parent, visitor);
1302+
visit_item(item, (parent, visitor));
13031303
}
13041304

13051305
item_trait(_, _, ref methods) => {
@@ -1349,7 +1349,7 @@ impl Resolver {
13491349
match ty_m.explicit_self.node {
13501350
sty_static => {}
13511351
_ => {
1352-
method_names.insert(ident);
1352+
method_names.insert(ident, ());
13531353
}
13541354
}
13551355
}
@@ -2054,7 +2054,7 @@ impl Resolver {
20542054
} else {
20552055
result.push_str("::")
20562056
}
2057-
result.push_str(*self.session.str_of(*ident));
2057+
result.push_str(self.session.str_of(*ident));
20582058
};
20592059
return result;
20602060
}

src/librustc/middle/trans/asm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ pub fn trans_inline_asm(bcx: block, ia: &ast::inline_asm) -> block {
9898
if !ia.clobbers.is_empty() && !clobbers.is_empty() {
9999
clobbers = fmt!("%s,%s", ia.clobbers, clobbers);
100100
} else {
101-
clobbers.push_str(*ia.clobbers);
101+
clobbers.push_str(ia.clobbers);
102102
};
103103

104104
// Add the clobbers to our constraints list

src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2890,7 +2890,7 @@ pub fn trans_crate(sess: session::Session,
28902890
emap2: resolve::ExportMap2,
28912891
reachable_map: @mut HashSet<ast::node_id>,
28922892
maps: astencode::Maps)
2893-
-> (ContextRef, ModuleRef, LinkMeta) {
2893+
-> (ModuleRef, LinkMeta) {
28942894
28952895
let mut symbol_hasher = hash::default_state();
28962896
let link_meta = link::build_link_meta(sess, crate, output, &mut symbol_hasher);

src/librustc/middle/trans/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,7 @@ pub fn path_str(sess: session::Session, p: &[path_elt]) -> ~str {
10461046
} else {
10471047
r.push_str("::")
10481048
}
1049-
r.push_str(*sess.str_of(s));
1049+
r.push_str(sess.str_of(s));
10501050
}
10511051
}
10521052
}

src/librustc/middle/typeck/check/mod.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -799,9 +799,8 @@ impl FnCtxt {
799799
match self.inh.node_types.find(&ex.id) {
800800
Some(&t) => t,
801801
None => {
802-
self.tcx().sess.bug(
803-
fmt!("no type for %s in fcx %s",
804-
self.expr_to_str(ex), self.tag()));
802+
self.tcx().sess.bug(fmt!("no type for expr in fcx %s",
803+
self.tag()));
805804
}
806805
}
807806
}
@@ -1141,7 +1140,7 @@ pub fn check_expr_with_unifier(fcx: @mut FnCtxt,
11411140
expr: @ast::expr,
11421141
expected: Option<ty::t>,
11431142
unifier: &fn()) {
1144-
debug!(">> typechecking %s", fcx.expr_to_str(expr));
1143+
debug!(">> typechecking");
11451144

11461145
fn check_method_argument_types(
11471146
fcx: @mut FnCtxt,
@@ -1730,8 +1729,7 @@ pub fn check_expr_with_unifier(fcx: @mut FnCtxt,
17301729
ty::mk_closure(tcx, fn_ty_copy)
17311730
};
17321731

1733-
debug!("check_expr_fn_with_unifier %s fty=%s",
1734-
fcx.expr_to_str(expr),
1732+
debug!("check_expr_fn_with_unifier fty=%s",
17351733
fcx.infcx().ty_to_str(fty));
17361734

17371735
fcx.write_ty(expr.id, fty);

src/librustc/middle/typeck/check/regionck.rs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ fn constrain_bindings_in_pat(pat: @ast::pat, rcx: @mut Rcx) {
230230
}
231231

232232
fn visit_expr(expr: @ast::expr, (rcx, v): (@mut Rcx, rvt)) {
233-
debug!("regionck::visit_expr(e=%s)", rcx.fcx.expr_to_str(expr));
233+
debug!("regionck::visit_expr(e=?)");
234234

235235
let has_method_map = rcx.fcx.inh.method_map.contains_key(&expr.id);
236236

@@ -520,8 +520,7 @@ fn constrain_derefs(rcx: @mut Rcx,
520520
let tcx = rcx.fcx.tcx();
521521
let r_deref_expr = ty::re_scope(deref_expr.id);
522522
for uint::range(0, derefs) |i| {
523-
debug!("constrain_derefs(deref_expr=%s, derefd_ty=%s, derefs=%?/%?",
524-
rcx.fcx.expr_to_str(deref_expr),
523+
debug!("constrain_derefs(deref_expr=?, derefd_ty=%s, derefs=%?/%?",
525524
rcx.fcx.infcx().ty_to_str(derefd_ty),
526525
i, derefs);
527526

@@ -576,8 +575,7 @@ fn constrain_index(rcx: @mut Rcx,
576575

577576
let tcx = rcx.fcx.tcx();
578577

579-
debug!("constrain_index(index_expr=%s, indexed_ty=%s",
580-
rcx.fcx.expr_to_str(index_expr),
578+
debug!("constrain_index(index_expr=?, indexed_ty=%s",
581579
rcx.fcx.infcx().ty_to_str(indexed_ty));
582580

583581
let r_index_expr = ty::re_scope(index_expr.id);
@@ -808,7 +806,7 @@ pub mod guarantor {
808806
* to the lifetime of its guarantor (if any).
809807
*/
810808

811-
debug!("guarantor::for_addr_of(base=%s)", rcx.fcx.expr_to_str(base));
809+
debug!("guarantor::for_addr_of(base=?)");
812810

813811
let guarantor = guarantor(rcx, base);
814812
link(rcx, expr.span, expr.id, guarantor);
@@ -842,8 +840,7 @@ pub mod guarantor {
842840
* region pointers.
843841
*/
844842

845-
debug!("guarantor::for_autoref(expr=%s, autoref=%?)",
846-
rcx.fcx.expr_to_str(expr), autoref);
843+
debug!("guarantor::for_autoref(autoref=%?)", autoref);
847844

848845
let mut expr_ct = categorize_unadjusted(rcx, expr);
849846
debug!(" unadjusted cat=%?", expr_ct.cat);
@@ -970,7 +967,7 @@ pub mod guarantor {
970967
* `&expr`).
971968
*/
972969

973-
debug!("guarantor(expr=%s)", rcx.fcx.expr_to_str(expr));
970+
debug!("guarantor()");
974971
match expr.node {
975972
ast::expr_unary(_, ast::deref, b) => {
976973
let cat = categorize(rcx, b);
@@ -1034,7 +1031,7 @@ pub mod guarantor {
10341031
}
10351032

10361033
fn categorize(rcx: @mut Rcx, expr: @ast::expr) -> ExprCategorization {
1037-
debug!("categorize(expr=%s)", rcx.fcx.expr_to_str(expr));
1034+
debug!("categorize()");
10381035

10391036
let mut expr_ct = categorize_unadjusted(rcx, expr);
10401037
debug!("before adjustments, cat=%?", expr_ct.cat);
@@ -1086,7 +1083,7 @@ pub mod guarantor {
10861083
fn categorize_unadjusted(rcx: @mut Rcx,
10871084
expr: @ast::expr)
10881085
-> ExprCategorizationType {
1089-
debug!("categorize_unadjusted(expr=%s)", rcx.fcx.expr_to_str(expr));
1086+
debug!("categorize_unadjusted()");
10901087

10911088
let guarantor = {
10921089
if rcx.fcx.inh.method_map.contains_key(&expr.id) {

src/libstd/path.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use cmp::Eq;
2121
use iterator::IteratorUtil;
2222
use libc;
2323
use option::{None, Option, Some};
24-
use str::{Str, StrSlice, StrVector};
24+
use str::{OwnedStr, Str, StrSlice, StrVector};
2525
use str;
2626
use to_str::ToStr;
2727
use ascii::{AsciiCast, AsciiStr};

src/libstd/str.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,8 @@ impl<'self> StrSlice<'self> for &'self str {
14271427
fn slice_chars(&self, begin: uint, end: uint) -> &'self str {
14281428
assert!(begin <= end);
14291429
// not sure how to use the iterators for this nicely.
1430-
let mut (position, count) = (0, 0);
1430+
let mut position = 0;
1431+
let mut count = 0;
14311432
let l = self.len();
14321433
while count < begin && position < l {
14331434
position = self.char_range_at(position).next;
@@ -1575,7 +1576,8 @@ impl<'self> StrSlice<'self> for &'self str {
15751576
* The original string with all occurances of `from` replaced with `to`
15761577
*/
15771578
pub fn replace(&self, from: &str, to: &str) -> ~str {
1578-
let mut (result, last_end) = (~"", 0);
1579+
let mut result = ~"";
1580+
let mut last_end = 0;
15791581
for self.matches_index_iter(from).advance |(start, end)| {
15801582
result.push_str(unsafe{raw::slice_bytes(*self, last_end, start)});
15811583
result.push_str(to);

src/libsyntax/ext/pipes/pipec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ impl gen_send for message {
9898
}
9999
body.push_str(fmt!("let message = %s(%s);\n",
100100
name,
101-
vec::append_one(arg_names.map(|x| cx.str_of(*x)), ~"s")
101+
vec::append_one(arg_names.map(|x| cx.str_of(*x)), @"s")
102102
.connect(", ")));
103103

104104
if !try {

src/libsyntax/parse/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ impl Parser {
378378
self.fatal(
379379
fmt!(
380380
"expected `%s`, found `%s`",
381-
*self.id_to_str(kw.to_ident()),
381+
self.id_to_str(kw.to_ident()).to_str(),
382382
self.this_token_to_str()
383383
)
384384
);

0 commit comments

Comments
 (0)