@@ -268,7 +268,7 @@ pub fn trans_static_method_callee(bcx: @mut Block,
268268 typeck:: vtable_static( impl_did, ref rcvr_substs, rcvr_origins) => {
269269 assert ! ( rcvr_substs. iter( ) . all( |t| !ty:: type_needs_infer( * t) ) ) ;
270270
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 ) ;
272272 let ( callee_substs, callee_origins) =
273273 combine_impl_and_methods_tps (
274274 bcx, mth_id, callee_id,
@@ -294,8 +294,7 @@ pub fn trans_static_method_callee(bcx: @mut Block,
294294
295295pub fn method_with_name ( ccx : & mut CrateContext ,
296296 impl_id : ast:: DefId ,
297- name : ast:: Ident ) -> ast:: DefId {
298- // NOTE : SHOULD USE NAME (chonged later)
297+ name : ast:: Name ) -> ast:: DefId {
299298 let meth_id_opt = ccx. impl_method_cache . find_copy ( & ( impl_id, name) ) ;
300299 match meth_id_opt {
301300 Some ( m) => return m,
@@ -304,7 +303,7 @@ pub fn method_with_name(ccx: &mut CrateContext,
304303
305304 let imp = ccx. tcx . impls . find ( & impl_id)
306305 . 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)
308307 . expect ( "could not find method while translating" ) ;
309308
310309 ccx. impl_method_cache . insert ( ( impl_id, name) , meth. def_id ) ;
@@ -324,7 +323,7 @@ pub fn trans_monomorphized_callee(bcx: @mut Block,
324323 typeck:: vtable_static( impl_did, ref rcvr_substs, rcvr_origins) => {
325324 let ccx = bcx. ccx ( ) ;
326325 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 ) ;
328327
329328 // obtain the `self` value:
330329 let mut temp_cleanups = ~[ ] ;
@@ -601,7 +600,7 @@ fn emit_vtable_methods(bcx: @mut Block,
601600 let ident = ty:: method ( tcx, * method_def_id) . ident ;
602601 // The substitutions we have are on the impl, so we grab
603602 // 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 ) ;
605604 let m = ty:: method ( tcx, m_id) ;
606605 debug ! ( "(making impl vtable) emitting method %s at subst %s" ,
607606 m. repr( tcx) ,
0 commit comments