Skip to content

Commit 2213fe5

Browse files
committed
---
yaml --- r: 20735 b: refs/heads/snap-stage3 c: dbd39f8 h: refs/heads/master i: 20733: c2b7cd5 20731: cbf166a 20727: 80e7d3b 20719: 53d1509 20703: 58a8736 20671: 492a418 20607: 01f8e56 20479: 9ebca6f v: v3
1 parent 30178a7 commit 2213fe5

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: e430a699f2c60890d9b86069fd0c68a70ece7120
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: d665ae956a4658860991783a3ff84ad6088e3e09
4+
refs/heads/snap-stage3: dbd39f868bad019ea36fc4d7557015f94d255f06
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/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()))

branches/snap-stage3/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,

branches/snap-stage3/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)