diff options
Diffstat (limited to 'compiler/rustc_lint/src/non_fmt_panic.rs')
| -rw-r--r-- | compiler/rustc_lint/src/non_fmt_panic.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/non_fmt_panic.rs b/compiler/rustc_lint/src/non_fmt_panic.rs index 3130d57c2a9..f21f25c3584 100644 --- a/compiler/rustc_lint/src/non_fmt_panic.rs +++ b/compiler/rustc_lint/src/non_fmt_panic.rs @@ -149,7 +149,7 @@ fn check_panic<'tcx>(cx: &LateContext<'tcx>, f: &'tcx hir::Expr<'tcx>, arg: &'tc ty::Ref(_, r, _) if *r.kind() == ty::Str, ) || matches!( ty.ty_adt_def(), - Some(ty_def) if cx.tcx.is_diagnostic_item(sym::String, ty_def.did), + Some(ty_def) if cx.tcx.is_diagnostic_item(sym::String, ty_def.did()), ); let (suggest_display, suggest_debug) = cx.tcx.infer_ctxt().enter(|infcx| { |
