@@ -5,7 +5,6 @@ use rustc_hir as hir;
55use rustc_infer:: infer:: TyCtxtInferExt ;
66use rustc_middle:: lint:: in_external_macro;
77use rustc_middle:: ty;
8- use rustc_middle:: ty:: subst:: InternalSubsts ;
98use rustc_parse_format:: { ParseMode , Parser , Piece } ;
109use rustc_session:: lint:: FutureIncompatibilityReason ;
1110use rustc_span:: edition:: Edition ;
@@ -154,15 +153,11 @@ fn check_panic<'tcx>(cx: &LateContext<'tcx>, f: &'tcx hir::Expr<'tcx>, arg: &'tc
154153 let infcx = cx. tcx . infer_ctxt ( ) . build ( ) ;
155154 let suggest_display = is_str
156155 || cx. tcx . get_diagnostic_item ( sym:: Display ) . map ( |t| {
157- infcx
158- . type_implements_trait ( t, ty, InternalSubsts :: empty ( ) , cx. param_env )
159- . may_apply ( )
156+ infcx. type_implements_trait ( t, ty, ty:: List :: empty ( ) , cx. param_env ) . may_apply ( )
160157 } ) == Some ( true ) ;
161158 let suggest_debug = !suggest_display
162159 && cx. tcx . get_diagnostic_item ( sym:: Debug ) . map ( |t| {
163- infcx
164- . type_implements_trait ( t, ty, InternalSubsts :: empty ( ) , cx. param_env )
165- . may_apply ( )
160+ infcx. type_implements_trait ( t, ty, ty:: List :: empty ( ) , cx. param_env ) . may_apply ( )
166161 } ) == Some ( true ) ;
167162
168163 let suggest_panic_any = !is_str && panic == sym:: std_panic_macro;
0 commit comments