@@ -192,7 +192,7 @@ impl<'self> LookupContext<'self> {
192192
193193 // Prepare the list of candidates
194194 self . push_inherent_candidates ( self_ty) ;
195- self . push_extension_candidates ( self_ty ) ;
195+ self . push_extension_candidates ( ) ;
196196
197197 let mut enum_dids = ~[ ] ;
198198 let mut self_ty = self_ty;
@@ -326,7 +326,7 @@ impl<'self> LookupContext<'self> {
326326 }
327327 }
328328
329- pub fn push_extension_candidates ( & self , self_ty : ty :: t ) {
329+ pub fn push_extension_candidates ( & self ) {
330330 // If the method being called is associated with a trait, then
331331 // find all the impls of that trait. Each of those are
332332 // candidates.
@@ -343,17 +343,8 @@ impl<'self> LookupContext<'self> {
343343 for impl_infos. each |impl_info| {
344344 self . push_candidates_from_impl (
345345 self . extension_candidates , * impl_info) ;
346- }
347- }
348346
349- // Look for default methods.
350- match self . tcx ( ) . provided_methods . find ( trait_did) {
351- Some ( & methods) => {
352- self . push_candidates_from_provided_methods (
353- self . extension_candidates , self_ty, * trait_did,
354- methods) ;
355347 }
356- None => { }
357348 }
358349 }
359350 }
@@ -580,44 +571,6 @@ impl<'self> LookupContext<'self> {
580571 } ) ;
581572 }
582573
583- pub fn push_candidates_from_provided_methods ( & self ,
584- candidates :
585- & mut ~[ Candidate ] ,
586- self_ty : ty:: t ,
587- trait_def_id : def_id ,
588- methods :
589- & mut ~[ @ProvidedMethodInfo ] )
590- {
591- debug ! ( "(pushing candidates from provided methods) considering trait \
592- id %d:%d",
593- trait_def_id. crate ,
594- trait_def_id. node) ;
595-
596- for methods. each |provided_method_info| {
597- if provided_method_info. method_info . ident != self . m_name { loop ; }
598-
599- debug ! ( "(pushing candidates from provided methods) adding \
600- candidate") ;
601-
602- let method = ty:: method ( self . tcx ( ) ,
603- provided_method_info. method_info . did ) ;
604-
605- // FIXME #4099 (?) Needs to support generics.
606- let dummy_substs = substs {
607- self_r : None ,
608- self_ty : None ,
609- tps : ~[ ]
610- } ;
611-
612- candidates. push ( Candidate {
613- rcvr_ty : self_ty,
614- rcvr_substs : dummy_substs,
615- method_ty : method,
616- origin : method_static ( provided_method_info. method_info . did )
617- } ) ;
618- }
619- }
620-
621574 // ______________________________________________________________________
622575 // Candidate selection (see comment at start of file)
623576
0 commit comments