@@ -268,7 +268,7 @@ pub fn trans_static_method_callee(bcx: @mut Block,
268
268
typeck:: vtable_static( impl_did, ref rcvr_substs, rcvr_origins) => {
269
269
assert ! ( rcvr_substs. iter( ) . all( |t| !ty:: type_needs_infer( * t) ) ) ;
270
270
271
- let mth_id = method_with_name ( bcx. ccx ( ) , impl_did, mname) ;
271
+ let mth_id = method_with_name ( bcx. ccx ( ) , impl_did, mname. name ) ;
272
272
let ( callee_substs, callee_origins) =
273
273
combine_impl_and_methods_tps (
274
274
bcx, mth_id, callee_id,
@@ -294,8 +294,7 @@ pub fn trans_static_method_callee(bcx: @mut Block,
294
294
295
295
pub fn method_with_name ( ccx : & mut CrateContext ,
296
296
impl_id : ast:: DefId ,
297
- name : ast:: Ident ) -> ast:: DefId {
298
- // NOTE : SHOULD USE NAME (chonged later)
297
+ name : ast:: Name ) -> ast:: DefId {
299
298
let meth_id_opt = ccx. impl_method_cache . find_copy ( & ( impl_id, name) ) ;
300
299
match meth_id_opt {
301
300
Some ( m) => return m,
@@ -304,7 +303,7 @@ pub fn method_with_name(ccx: &mut CrateContext,
304
303
305
304
let imp = ccx. tcx . impls . find ( & impl_id)
306
305
. expect ( "could not find impl while translating" ) ;
307
- let meth = imp. methods . iter ( ) . find ( |m| m. ident . name == name. name )
306
+ let meth = imp. methods . iter ( ) . find ( |m| m. ident . name == name)
308
307
. expect ( "could not find method while translating" ) ;
309
308
310
309
ccx. impl_method_cache . insert ( ( impl_id, name) , meth. def_id ) ;
@@ -324,7 +323,7 @@ pub fn trans_monomorphized_callee(bcx: @mut Block,
324
323
typeck:: vtable_static( impl_did, ref rcvr_substs, rcvr_origins) => {
325
324
let ccx = bcx. ccx ( ) ;
326
325
let mname = ty:: trait_method ( ccx. tcx , trait_id, n_method) . ident ;
327
- let mth_id = method_with_name ( bcx. ccx ( ) , impl_did, mname) ;
326
+ let mth_id = method_with_name ( bcx. ccx ( ) , impl_did, mname. name ) ;
328
327
329
328
// obtain the `self` value:
330
329
let mut temp_cleanups = ~[ ] ;
@@ -601,7 +600,7 @@ fn emit_vtable_methods(bcx: @mut Block,
601
600
let ident = ty:: method ( tcx, * method_def_id) . ident ;
602
601
// The substitutions we have are on the impl, so we grab
603
602
// the method type from the impl to substitute into.
604
- let m_id = method_with_name ( ccx, impl_id, ident) ;
603
+ let m_id = method_with_name ( ccx, impl_id, ident. name ) ;
605
604
let m = ty:: method ( tcx, m_id) ;
606
605
debug ! ( "(making impl vtable) emitting method %s at subst %s" ,
607
606
m. repr( tcx) ,
0 commit comments