@@ -2,16 +2,14 @@ use std::borrow::Cow;
2
2
use std:: iter;
3
3
4
4
use rustc_data_structures:: fx:: FxIndexSet ;
5
- use rustc_errors:: {
6
- Applicability , Applicability , E0053 , E0053 , struct_span_code_err, struct_span_code_err,
7
- } ;
5
+ use rustc_errors:: { Applicability , E0053 , E0053 , struct_span_code_err, struct_span_code_err} ;
8
6
use rustc_hir:: def_id:: { DefId , LocalDefId } ;
9
7
use rustc_hir:: { self as hir, self as hir, HirId , HirId , ItemKind , ItemKind } ;
10
8
use rustc_infer:: infer:: { self , InferCtxt , TyCtxtInferExt } ;
11
9
use rustc_infer:: traits:: { ObligationCause , ObligationCauseCode } ;
12
10
use rustc_middle:: ty;
13
11
use rustc_middle:: ty:: TyCtxt ;
14
- use rustc_middle:: ty:: error:: { ExpectedFound , ExpectedFound , TypeError , TypeError } ;
12
+ use rustc_middle:: ty:: error:: { ExpectedFound , TypeError , TypeError } ;
15
13
use rustc_span:: { ErrorGuaranteed , Ident , Span } ;
16
14
use rustc_trait_selection:: error_reporting:: InferCtxtErrorExt ;
17
15
use rustc_trait_selection:: regions:: InferCtxtRegionExt ;
@@ -54,11 +52,13 @@ pub(crate) fn compare_eii_function_types<'tcx>(
54
52
// type.
55
53
56
54
let wf_tys = FxIndexSet :: default ( ) ;
57
-
58
55
let external_impl_sig = infcx. instantiate_binder_with_fresh_vars (
59
56
external_impl_span,
60
57
infer:: HigherRankedType ,
61
- tcx. fn_sig ( external_impl) . instantiate_identity ( ) ,
58
+ tcx. fn_sig ( external_impl) . instantiate (
59
+ tcx,
60
+ infcx. fresh_args_for_item ( external_impl_span, external_impl. to_def_id ( ) ) ,
61
+ ) ,
62
62
) ;
63
63
64
64
let norm_cause = ObligationCause :: misc ( external_impl_span, external_impl) ;
0 commit comments