@@ -90,7 +90,7 @@ use middle::typeck::check::{structurally_resolved_type};
90
90
use middle:: typeck:: check:: vtable;
91
91
use middle:: typeck:: check;
92
92
use middle:: typeck:: infer;
93
- use middle:: typeck:: { method_map_entry , method_origin, method_param} ;
93
+ use middle:: typeck:: { method_origin, method_param} ;
94
94
use middle:: typeck:: { method_static, method_object} ;
95
95
use middle:: typeck:: { param_numbered, param_self, param_index} ;
96
96
use middle:: typeck:: check:: regionmanip:: replace_bound_regions_in_fn_sig;
@@ -133,7 +133,7 @@ pub fn lookup(
133
133
deref_args : check:: DerefArgs , // Whether we autopointer first.
134
134
check_traits : CheckTraitsFlag , // Whether we check traits only.
135
135
autoderef_receiver : AutoderefReceiverFlag )
136
- -> Option < method_map_entry > {
136
+ -> Option < method_origin > {
137
137
let impl_dups = @RefCell :: new ( HashSet :: new ( ) ) ;
138
138
let lcx = LookupContext {
139
139
fcx : fcx,
@@ -211,7 +211,7 @@ enum RcvrMatchCondition {
211
211
}
212
212
213
213
impl < ' a > LookupContext < ' a > {
214
- fn search ( & self , self_ty : ty:: t ) -> Option < method_map_entry > {
214
+ fn search ( & self , self_ty : ty:: t ) -> Option < method_origin > {
215
215
let mut self_ty = self_ty;
216
216
let mut autoderefs = 0 ;
217
217
loop {
@@ -592,7 +592,7 @@ impl<'a> LookupContext<'a> {
592
592
fn search_for_autoderefd_method ( & self ,
593
593
self_ty : ty:: t ,
594
594
autoderefs : uint )
595
- -> Option < method_map_entry > {
595
+ -> Option < method_origin > {
596
596
let ( self_ty, autoadjust) =
597
597
self . consider_reborrow ( self_ty, autoderefs) ;
598
598
match self . search_for_method ( self_ty) {
@@ -686,9 +686,9 @@ impl<'a> LookupContext<'a> {
686
686
}
687
687
688
688
fn search_for_autosliced_method ( & self ,
689
- self_ty : ty:: t ,
690
- autoderefs : uint )
691
- -> Option < method_map_entry > {
689
+ self_ty : ty:: t ,
690
+ autoderefs : uint )
691
+ -> Option < method_origin > {
692
692
/*!
693
693
*
694
694
* Searches for a candidate by converting things like
@@ -763,7 +763,7 @@ impl<'a> LookupContext<'a> {
763
763
}
764
764
765
765
fn search_for_autoptrd_method ( & self , self_ty : ty:: t , autoderefs : uint )
766
- -> Option < method_map_entry > {
766
+ -> Option < method_origin > {
767
767
/*!
768
768
*
769
769
* Converts any type `T` to `&M T` where `M` is an
@@ -799,7 +799,7 @@ impl<'a> LookupContext<'a> {
799
799
autoderefs : uint ,
800
800
mutbls : & [ ast:: Mutability ] ,
801
801
mk_autoref_ty : |ast:: Mutability , ty:: Region | -> ty:: t)
802
- -> Option < method_map_entry > {
802
+ -> Option < method_origin > {
803
803
// This is hokey. We should have mutability inference as a
804
804
// variable. But for now, try &const, then &, then &mut:
805
805
let region =
@@ -823,7 +823,7 @@ impl<'a> LookupContext<'a> {
823
823
}
824
824
825
825
fn search_for_method ( & self , rcvr_ty : ty:: t )
826
- -> Option < method_map_entry > {
826
+ -> Option < method_origin > {
827
827
debug ! ( "search_for_method(rcvr_ty={})" , self . ty_to_str( rcvr_ty) ) ;
828
828
let _indenter = indenter ( ) ;
829
829
@@ -855,7 +855,7 @@ impl<'a> LookupContext<'a> {
855
855
fn consider_candidates ( & self ,
856
856
rcvr_ty : ty:: t ,
857
857
candidates : & mut ~[ Candidate ] )
858
- -> Option < method_map_entry > {
858
+ -> Option < method_origin > {
859
859
// FIXME(pcwalton): Do we need to clone here?
860
860
let relevant_candidates: ~[ Candidate ] =
861
861
candidates. iter ( ) . map ( |c| ( * c) . clone ( ) ) .
@@ -926,7 +926,7 @@ impl<'a> LookupContext<'a> {
926
926
}
927
927
928
928
fn confirm_candidate ( & self , rcvr_ty : ty:: t , candidate : & Candidate )
929
- -> method_map_entry {
929
+ -> method_origin {
930
930
// This method performs two sets of substitutions, one after the other:
931
931
// 1. Substitute values for any type/lifetime parameters from the impl and
932
932
// method declaration into the method type. This is the function type
@@ -1037,9 +1037,7 @@ impl<'a> LookupContext<'a> {
1037
1037
1038
1038
self . fcx . write_ty ( self . callee_id , fty) ;
1039
1039
self . fcx . write_substs ( self . callee_id , all_substs) ;
1040
- method_map_entry {
1041
- origin : candidate. origin
1042
- }
1040
+ candidate. origin
1043
1041
}
1044
1042
1045
1043
fn construct_transformed_self_ty_for_object (
0 commit comments