From 028df11976b87d6a0142912bf1067bd9afb482b8 Mon Sep 17 00:00:00 2001 From: trevyn <230691+trevyn@users.noreply.github.com> Date: Sat, 13 Jul 2024 19:13:47 +0400 Subject: [PATCH] Fix `is_diagnostic_item()` example --- src/diagnostics/diagnostic-items.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/diagnostics/diagnostic-items.md b/src/diagnostics/diagnostic-items.md index 78fdd032d..9360427d6 100644 --- a/src/diagnostics/diagnostic-items.md +++ b/src/diagnostics/diagnostic-items.md @@ -104,7 +104,7 @@ use rustc_span::symbol::sym; /// `TyCtxt::is_diagnostic_item()` fn example_1(cx: &LateContext<'_>, ty: Ty<'_>) -> bool { match ty.kind() { - ty::Adt(adt, _) => cx.tcx.is_diagnostic_item(sym::HashMap, adt.did), + ty::Adt(adt, _) => cx.tcx.is_diagnostic_item(sym::HashMap, adt.did()), _ => false, } }