Skip to content

Commit dbd39f8

Browse files
committed
rustc: "ifce" -> "trt" in identifiers
1 parent d665ae9 commit dbd39f8

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/rustc/middle/trans/impl.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,12 @@ fn make_impl_vtable(ccx: @crate_ctxt, impl_id: ast::def_id, substs: ~[ty::t],
255255
let tcx = ccx.tcx;
256256

257257
// XXX: This should support multiple traits.
258-
let ifce_id = expect(ccx.sess,
259-
ty::ty_to_def_id(ty::impl_traits(tcx, impl_id)[0]),
260-
|| ~"make_impl_vtable: non-trait-type implemented");
258+
let trt_id = expect(ccx.sess,
259+
ty::ty_to_def_id(ty::impl_traits(tcx, impl_id)[0]),
260+
|| ~"make_impl_vtable: non-trait-type implemented");
261261

262262
let has_tps = (*ty::lookup_item_type(ccx.tcx, impl_id).bounds).len() > 0u;
263-
make_vtable(ccx, vec::map(*ty::trait_methods(tcx, ifce_id), |im| {
263+
make_vtable(ccx, vec::map(*ty::trait_methods(tcx, trt_id), |im| {
264264
let fty = ty::subst_tps(tcx, substs, ty::mk_fn(tcx, im.fty));
265265
if (*im.tps).len() > 0u || ty::type_has_self(fty) {
266266
C_null(T_ptr(T_nil()))

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ class lookup {
214214
}
215215
};
216216

217-
let ifce_methods = ty::trait_methods(tcx, iid);
218-
alt vec::position(*ifce_methods, |m| m.ident == self.m_name) {
217+
let trt_methods = ty::trait_methods(tcx, iid);
218+
alt vec::position(*trt_methods, |m| m.ident == self.m_name) {
219219
none {
220220
/* check next bound */
221221
trait_bnd_idx += 1u;
@@ -233,7 +233,7 @@ class lookup {
233233
with bound_substs};
234234

235235
self.add_candidates_from_m(
236-
substs, ifce_methods[pos],
236+
substs, trt_methods[pos],
237237
method_param({trait_id:iid,
238238
method_num:pos,
239239
param_num:n,

src/rustc/middle/typeck/collect.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ fn convert(ccx: @crate_ctxt, it: @ast::item) {
325325
write_ty_to_tcx(tcx, it.id, tpt.ty);
326326
get_enum_variant_types(ccx, tpt.ty, variants, ty_params, rp);
327327
}
328-
ast::item_impl(tps, ifce, selfty, ms) {
328+
ast::item_impl(tps, trt, selfty, ms) {
329329
let i_bounds = ty_param_bounds(ccx, tps);
330330
let selfty = ccx.to_ty(type_rscope(rp), selfty);
331331
write_ty_to_tcx(tcx, it.id, selfty);
@@ -335,7 +335,7 @@ fn convert(ccx: @crate_ctxt, it: @ast::item) {
335335
ty: selfty});
336336

337337
let cms = convert_methods(ccx, ms, rp, i_bounds, selfty);
338-
for ifce.each |t| {
338+
for trt.each |t| {
339339
check_methods_against_trait(ccx, tps, rp, selfty, t, cms);
340340
}
341341
}
@@ -396,11 +396,11 @@ fn convert(ccx: @crate_ctxt, it: @ast::item) {
396396
let {bounds, substs} = mk_substs(ccx, tps, rp);
397397
let selfty = ty::mk_class(tcx, local_def(it.id), substs);
398398
let cms = convert_methods(ccx, methods, rp, bounds, selfty);
399-
for traits.each |ifce| {
400-
check_methods_against_trait(ccx, tps, rp, selfty, ifce, cms);
401-
// ifce.impl_id represents (class, iface) pair
402-
write_ty_to_tcx(tcx, ifce.impl_id, tpt.ty);
403-
tcx.tcache.insert(local_def(ifce.impl_id), tpt);
399+
for traits.each |trt| {
400+
check_methods_against_trait(ccx, tps, rp, selfty, trt, cms);
401+
// trt.impl_id represents (class, iface) pair
402+
write_ty_to_tcx(tcx, trt.impl_id, tpt.ty);
403+
tcx.tcache.insert(local_def(trt.impl_id), tpt);
404404
}
405405
}
406406
_ {

0 commit comments

Comments
 (0)