@@ -287,7 +287,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
287
287
self_ty,
288
288
scope_expr_id,
289
289
ProbeScope :: AllTraits ,
290
- |probe_cx| probe_cx. pick ( scope_expr_id ) ,
290
+ |probe_cx| probe_cx. pick ( ) ,
291
291
)
292
292
. ok ( )
293
293
. map ( |pick| pick. item )
@@ -319,7 +319,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
319
319
self_ty,
320
320
scope_expr_id,
321
321
scope,
322
- |probe_cx| probe_cx. pick ( scope_expr_id ) ,
322
+ |probe_cx| probe_cx. pick ( ) ,
323
323
)
324
324
}
325
325
@@ -1036,7 +1036,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
1036
1036
///////////////////////////////////////////////////////////////////////////
1037
1037
// THE ACTUAL SEARCH
1038
1038
1039
- fn pick ( mut self , scope_expr_id : hir :: HirId ) -> PickResult < ' tcx > {
1039
+ fn pick ( mut self ) -> PickResult < ' tcx > {
1040
1040
assert ! ( self . method_name. is_some( ) ) ;
1041
1041
1042
1042
if let Some ( r) = self . pick_core ( ) {
@@ -1082,7 +1082,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
1082
1082
if let Some ( ( kind, def_id) ) = private_candidate {
1083
1083
return Err ( MethodError :: PrivateMatch ( kind, def_id, out_of_scope_traits) ) ;
1084
1084
}
1085
- let lev_candidate = self . probe_for_lev_candidate ( scope_expr_id ) ?;
1085
+ let lev_candidate = self . probe_for_lev_candidate ( ) ?;
1086
1086
1087
1087
Err ( MethodError :: NoMatch ( NoMatchData :: new (
1088
1088
static_candidates,
@@ -1585,10 +1585,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
1585
1585
/// Similarly to `probe_for_return_type`, this method attempts to find the best matching
1586
1586
/// candidate method where the method name may have been misspelt. Similarly to other
1587
1587
/// Levenshtein based suggestions, we provide at most one such suggestion.
1588
- fn probe_for_lev_candidate (
1589
- & mut self ,
1590
- scope_expr_id : hir:: HirId ,
1591
- ) -> Result < Option < ty:: AssocItem > , MethodError < ' tcx > > {
1588
+ fn probe_for_lev_candidate ( & mut self ) -> Result < Option < ty:: AssocItem > , MethodError < ' tcx > > {
1592
1589
debug ! ( "probing for method names similar to {:?}" , self . method_name) ;
1593
1590
1594
1591
let steps = self . steps . clone ( ) ;
@@ -1602,7 +1599,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
1602
1599
self . orig_steps_var_values . clone ( ) ,
1603
1600
steps,
1604
1601
IsSuggestion ( true ) ,
1605
- scope_expr_id,
1602
+ self . scope_expr_id ,
1606
1603
) ;
1607
1604
pcx. allow_similar_names = true ;
1608
1605
pcx. assemble_inherent_candidates ( ) ;
0 commit comments