@@ -5,7 +5,6 @@ use rustc_hir as hir;
5
5
use rustc_infer:: infer:: TyCtxtInferExt ;
6
6
use rustc_middle:: lint:: in_external_macro;
7
7
use rustc_middle:: ty;
8
- use rustc_middle:: ty:: subst:: InternalSubsts ;
9
8
use rustc_parse_format:: { ParseMode , Parser , Piece } ;
10
9
use rustc_session:: lint:: FutureIncompatibilityReason ;
11
10
use rustc_span:: edition:: Edition ;
@@ -154,15 +153,11 @@ fn check_panic<'tcx>(cx: &LateContext<'tcx>, f: &'tcx hir::Expr<'tcx>, arg: &'tc
154
153
let infcx = cx. tcx . infer_ctxt ( ) . build ( ) ;
155
154
let suggest_display = is_str
156
155
|| 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 ( )
160
157
} ) == Some ( true ) ;
161
158
let suggest_debug = !suggest_display
162
159
&& 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 ( )
166
161
} ) == Some ( true ) ;
167
162
168
163
let suggest_panic_any = !is_str && panic == sym:: std_panic_macro;
0 commit comments