@@ -314,7 +314,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
314
314
// an impl. Even if there are no impls in this crate, perhaps
315
315
// the type would be unified with something from another crate
316
316
// that does provide an impl.
317
- let input_types = self . input_types ( & * stack. skol_trait_ref ) ;
317
+ let input_types = stack. skol_trait_ref . input_types ( ) ;
318
318
if input_types. iter ( ) . any ( |& t| ty:: type_is_skolemized ( t) ) {
319
319
debug ! ( "evaluate_stack_intercrate({}) --> unbound argument, must be ambiguous" ,
320
320
stack. skol_trait_ref. repr( self . tcx( ) ) ) ;
@@ -521,7 +521,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
521
521
// found in the source. This is because all the
522
522
// compiler-provided impls (such as those for unboxed
523
523
// closures) do not have relevant coercions. This simplifies
524
- // life immensly .
524
+ // life immensely .
525
525
526
526
let mut impls =
527
527
self . assemble_method_candidates_from_impls ( rcvr_ty, xform_self_ty, obligation) ;
@@ -586,7 +586,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
586
586
*/
587
587
588
588
self . infcx . commit_if_ok ( || {
589
- match self . infcx . sub_types ( false , infer:: Misc ( obligation. cause . span ) ,
589
+ match self . infcx . sub_types ( false , infer:: RelateSelfType ( obligation. cause . span ) ,
590
590
rcvr_ty, xform_self_ty) {
591
591
Ok ( ( ) ) => { }
592
592
Err ( _) => { return Err ( ( ) ) ; }
@@ -850,7 +850,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
850
850
// scope. Otherwise, use the generic tcx cache, since the
851
851
// result holds across all environments.
852
852
if
853
- self . input_types ( & * * cache_skol_trait_ref ) . iter ( ) . any (
853
+ cache_skol_trait_ref . input_types ( ) . iter ( ) . any (
854
854
|& t| ty:: type_has_self ( t) || ty:: type_has_params ( t) )
855
855
{
856
856
& self . param_env . selection_cache
@@ -1955,11 +1955,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
1955
1955
1956
1956
found_skol
1957
1957
}
1958
-
1959
- fn input_types < ' a > ( & self , trait_ref : & ' a ty:: TraitRef ) -> & ' a [ ty:: t ] {
1960
- // Select only the "input types" from a trait-reference.
1961
- trait_ref. substs . types . as_slice ( )
1962
- }
1963
1958
}
1964
1959
1965
1960
impl Repr for Candidate {
0 commit comments