mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
rustc: "ifce" -> "trt" in identifiers
This commit is contained in:
parent
d665ae956a
commit
dbd39f868b
@ -255,12 +255,12 @@ fn make_impl_vtable(ccx: @crate_ctxt, impl_id: ast::def_id, substs: ~[ty::t],
|
||||
let tcx = ccx.tcx;
|
||||
|
||||
// XXX: This should support multiple traits.
|
||||
let ifce_id = expect(ccx.sess,
|
||||
let trt_id = expect(ccx.sess,
|
||||
ty::ty_to_def_id(ty::impl_traits(tcx, impl_id)[0]),
|
||||
|| ~"make_impl_vtable: non-trait-type implemented");
|
||||
|
||||
let has_tps = (*ty::lookup_item_type(ccx.tcx, impl_id).bounds).len() > 0u;
|
||||
make_vtable(ccx, vec::map(*ty::trait_methods(tcx, ifce_id), |im| {
|
||||
make_vtable(ccx, vec::map(*ty::trait_methods(tcx, trt_id), |im| {
|
||||
let fty = ty::subst_tps(tcx, substs, ty::mk_fn(tcx, im.fty));
|
||||
if (*im.tps).len() > 0u || ty::type_has_self(fty) {
|
||||
C_null(T_ptr(T_nil()))
|
||||
|
@ -214,8 +214,8 @@ class lookup {
|
||||
}
|
||||
};
|
||||
|
||||
let ifce_methods = ty::trait_methods(tcx, iid);
|
||||
alt vec::position(*ifce_methods, |m| m.ident == self.m_name) {
|
||||
let trt_methods = ty::trait_methods(tcx, iid);
|
||||
alt vec::position(*trt_methods, |m| m.ident == self.m_name) {
|
||||
none {
|
||||
/* check next bound */
|
||||
trait_bnd_idx += 1u;
|
||||
@ -233,7 +233,7 @@ class lookup {
|
||||
with bound_substs};
|
||||
|
||||
self.add_candidates_from_m(
|
||||
substs, ifce_methods[pos],
|
||||
substs, trt_methods[pos],
|
||||
method_param({trait_id:iid,
|
||||
method_num:pos,
|
||||
param_num:n,
|
||||
|
@ -325,7 +325,7 @@ fn convert(ccx: @crate_ctxt, it: @ast::item) {
|
||||
write_ty_to_tcx(tcx, it.id, tpt.ty);
|
||||
get_enum_variant_types(ccx, tpt.ty, variants, ty_params, rp);
|
||||
}
|
||||
ast::item_impl(tps, ifce, selfty, ms) {
|
||||
ast::item_impl(tps, trt, selfty, ms) {
|
||||
let i_bounds = ty_param_bounds(ccx, tps);
|
||||
let selfty = ccx.to_ty(type_rscope(rp), selfty);
|
||||
write_ty_to_tcx(tcx, it.id, selfty);
|
||||
@ -335,7 +335,7 @@ fn convert(ccx: @crate_ctxt, it: @ast::item) {
|
||||
ty: selfty});
|
||||
|
||||
let cms = convert_methods(ccx, ms, rp, i_bounds, selfty);
|
||||
for ifce.each |t| {
|
||||
for trt.each |t| {
|
||||
check_methods_against_trait(ccx, tps, rp, selfty, t, cms);
|
||||
}
|
||||
}
|
||||
@ -396,11 +396,11 @@ fn convert(ccx: @crate_ctxt, it: @ast::item) {
|
||||
let {bounds, substs} = mk_substs(ccx, tps, rp);
|
||||
let selfty = ty::mk_class(tcx, local_def(it.id), substs);
|
||||
let cms = convert_methods(ccx, methods, rp, bounds, selfty);
|
||||
for traits.each |ifce| {
|
||||
check_methods_against_trait(ccx, tps, rp, selfty, ifce, cms);
|
||||
// ifce.impl_id represents (class, iface) pair
|
||||
write_ty_to_tcx(tcx, ifce.impl_id, tpt.ty);
|
||||
tcx.tcache.insert(local_def(ifce.impl_id), tpt);
|
||||
for traits.each |trt| {
|
||||
check_methods_against_trait(ccx, tps, rp, selfty, trt, cms);
|
||||
// trt.impl_id represents (class, iface) pair
|
||||
write_ty_to_tcx(tcx, trt.impl_id, tpt.ty);
|
||||
tcx.tcache.insert(local_def(trt.impl_id), tpt);
|
||||
}
|
||||
}
|
||||
_ {
|
||||
|
Loading…
Reference in New Issue
Block a user