@@ -168,8 +168,8 @@ impl LookupContext {
168
168
// around newtype enums. They can be further
169
169
// deref'd, but they may also have intrinsic
170
170
// methods hanging off of them with interior type.
171
- match self . search_for_appr_autorefd_method ( self_ty,
172
- autoderefs) {
171
+ match self . search_for_any_autorefd_method ( self_ty,
172
+ autoderefs) {
173
173
Some ( move mme) => { return Some ( mme) ; }
174
174
None => { }
175
175
}
@@ -186,7 +186,7 @@ impl LookupContext {
186
186
}
187
187
}
188
188
189
- self . search_for_appr_autorefd_method ( self_ty, autoderefs)
189
+ self . search_for_any_autorefd_method ( self_ty, autoderefs)
190
190
}
191
191
192
192
fn deref ( ty : ty:: t , enum_dids : & DVec < ast:: def_id > ) -> Option < ty:: t > {
@@ -527,15 +527,13 @@ impl LookupContext {
527
527
* Attempts both auto-slice and auto-ptr, as appropriate.
528
528
*/
529
529
530
- let tcx = self . tcx ( ) ;
531
-
532
530
match self . search_for_autosliced_method ( self_ty, autoderefs) {
533
- Some ( mme) => { return mme; }
531
+ Some ( move mme) => { return Some ( move mme) ; }
534
532
None => { }
535
533
}
536
534
537
535
match self . search_for_autoptrd_method ( self_ty, autoderefs) {
538
- Some ( mme) => { return mme; }
536
+ Some ( move mme) => { return Some ( move mme) ; }
539
537
None => { }
540
538
}
541
539
@@ -553,6 +551,7 @@ impl LookupContext {
553
551
* Searches for a candidate by converting things like
554
552
* `~[]` to `&[]`. */
555
553
554
+ let tcx = self . tcx ( ) ;
556
555
match ty:: get ( self_ty) . sty {
557
556
ty_evec( mt, vstore_box) |
558
557
ty_evec( mt, vstore_uniq) |
@@ -593,6 +592,7 @@ impl LookupContext {
593
592
* appropriate mutability.
594
593
*/
595
594
595
+ let tcx = self . tcx ( ) ;
596
596
match ty:: get ( self_ty) . sty {
597
597
ty_box( * ) | ty_uniq( * ) | ty_rptr( * ) => {
598
598
// we should be fully autoderef'd
0 commit comments