Skip to content

Commit abab49b

Browse files
committed
rustc: Fix tab characters
1 parent 94f05c1 commit abab49b

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed

src/rustc/middle/typeck/check/vtable.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ fn lookup_vtable_covariant(fcx: @fn_ctxt,
100100
allow_unsafe: bool,
101101
is_early: bool)
102102
-> Option<vtable_origin> {
103-
debug!("lookup_vtable_covariant(ty: %s, trait_ty=%s)",
104-
fcx.infcx().ty_to_str(ty),
105-
fcx.infcx().ty_to_str(trait_ty));
103+
debug!("lookup_vtable_covariant(ty: %s, trait_ty=%s)",
104+
fcx.infcx().ty_to_str(ty),
105+
fcx.infcx().ty_to_str(trait_ty));
106106

107107
let worklist = dvec::DVec();
108108
worklist.push(trait_ty);
@@ -479,16 +479,16 @@ fn early_resolve_expr(ex: @ast::expr, &&fcx: @fn_ctxt, is_early: bool) {
479479
ast::expr_path(*) => {
480480
match fcx.opt_node_ty_substs(ex.id) {
481481
Some(ref substs) => {
482-
let def = cx.tcx.def_map.get(ex.id);
482+
let def = cx.tcx.def_map.get(ex.id);
483483
let did = ast_util::def_id_of_def(def);
484-
debug!("early resolve expr: def %?", def);
484+
debug!("early resolve expr: def %?", def);
485485
let item_ty = ty::lookup_item_type(cx.tcx, did);
486486
if has_trait_bounds(*item_ty.bounds) {
487-
for item_ty.bounds.each |bounds| {
488-
debug!("early_resolve_expr: looking up vtables for bound \
489-
%s",
490-
ty::param_bounds_to_str(fcx.tcx(), *bounds));
491-
}
487+
for item_ty.bounds.each |bounds| {
488+
debug!("early_resolve_expr: looking up vtables for bound \
489+
%s",
490+
ty::param_bounds_to_str(fcx.tcx(), *bounds));
491+
}
492492
let vtbls = lookup_vtables(fcx, ex, item_ty.bounds,
493493
substs, false, is_early);
494494
if !is_early { cx.vtable_map.insert(ex.id, vtbls); }

src/rustc/middle/typeck/collect.rs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,11 @@ fn ensure_trait_methods(ccx: @crate_ctxt, id: ast::node_id, trait_ty: ty::t) {
231231
let trait_bounds = ty_param_bounds(ccx, params);
232232
let ty_m = trait_method_to_ty_method(*m);
233233
let method_ty = ty_of_ty_method(ccx, ty_m, region_paramd, def_id);
234-
if ty_m.self_ty.node == ast::sty_static {
235-
make_static_method_ty(ccx, ty_m, region_paramd,
236-
method_ty, trait_ty,
237-
trait_bounds);
238-
}
234+
if ty_m.self_ty.node == ast::sty_static {
235+
make_static_method_ty(ccx, ty_m, region_paramd,
236+
method_ty, trait_ty,
237+
trait_bounds);
238+
}
239239
method_ty
240240
});
241241
}
@@ -423,21 +423,21 @@ fn check_methods_against_trait(ccx: @crate_ctxt,
423423
let (did, tpt) = instantiate_trait_ref(ccx, a_trait_ty, rp);
424424
425425
if did.crate == ast::local_crate {
426-
// NB: This is subtle. We need to do this on the type of the trait
427-
// item *itself*, not on the type that includes the parameter
428-
// substitutions provided by the programmer at this particular
429-
// trait ref. Otherwise, we will potentially overwrite the types of
430-
// the methods within the trait with bogus results. (See issue #3903.)
431-
432-
match tcx.items.find(did.node) {
433-
Some(ast_map::node_item(item, _)) => {
434-
let tpt = ty_of_item(ccx, item);
435-
ensure_trait_methods(ccx, did.node, tpt.ty);
436-
}
437-
_ => {
438-
tcx.sess.bug(~"trait ref didn't resolve to trait");
439-
}
440-
}
426+
// NB: This is subtle. We need to do this on the type of the trait
427+
// item *itself*, not on the type that includes the parameter
428+
// substitutions provided by the programmer at this particular
429+
// trait ref. Otherwise, we will potentially overwrite the types of
430+
// the methods within the trait with bogus results. (See issue #3903.)
431+
432+
match tcx.items.find(did.node) {
433+
Some(ast_map::node_item(item, _)) => {
434+
let tpt = ty_of_item(ccx, item);
435+
ensure_trait_methods(ccx, did.node, tpt.ty);
436+
}
437+
_ => {
438+
tcx.sess.bug(~"trait ref didn't resolve to trait");
439+
}
440+
}
441441
}
442442
443443
for vec::each(*ty::trait_methods(tcx, did)) |trait_m| {

0 commit comments

Comments
 (0)