@@ -2,14 +2,16 @@ use std::borrow::Cow;
22use std:: iter;
33
44use rustc_data_structures:: fx:: FxIndexSet ;
5- use rustc_errors:: { Applicability , E0053 , struct_span_code_err} ;
5+ use rustc_errors:: {
6+ Applicability , Applicability , E0053 , E0053 , struct_span_code_err, struct_span_code_err,
7+ } ;
68use rustc_hir:: def_id:: { DefId , LocalDefId } ;
7- use rustc_hir:: { self as hir, HirId , ItemKind } ;
9+ use rustc_hir:: { self as hir, self as hir , HirId , HirId , ItemKind , ItemKind } ;
810use rustc_infer:: infer:: { self , InferCtxt , TyCtxtInferExt } ;
911use rustc_infer:: traits:: { ObligationCause , ObligationCauseCode } ;
1012use rustc_middle:: ty;
1113use rustc_middle:: ty:: TyCtxt ;
12- use rustc_middle:: ty:: error:: { ExpectedFound , TypeError } ;
14+ use rustc_middle:: ty:: error:: { ExpectedFound , ExpectedFound , TypeError , TypeError } ;
1315use rustc_span:: { ErrorGuaranteed , Ident , Span } ;
1416use rustc_trait_selection:: error_reporting:: InferCtxtErrorExt ;
1517use rustc_trait_selection:: regions:: InferCtxtRegionExt ;
@@ -63,7 +65,7 @@ pub(crate) fn compare_eii_function_types<'tcx>(
6365 let external_impl_sig = ocx. normalize ( & norm_cause, param_env, external_impl_sig) ;
6466 debug ! ( ?external_impl_sig) ;
6567
66- let declaration_sig = tcx. fn_sig ( declaration) . no_bound_vars ( ) . expect ( "no bound vars" ) ;
68+ let declaration_sig = tcx. fn_sig ( declaration) . instantiate_identity ( ) ;
6769 let declaration_sig =
6870 tcx. liberate_late_bound_regions ( external_impl. to_def_id ( ) , declaration_sig) ;
6971 let declaration_sig = ocx. normalize ( & norm_cause, param_env, declaration_sig) ;
0 commit comments