diff options
| author | trevyn <230691+trevyn@users.noreply.github.com> | 2024-07-13 19:13:47 +0400 |
|---|---|---|
| committer | nora <48135649+Noratrieb@users.noreply.github.com> | 2024-09-24 19:56:37 +0200 |
| commit | 847b89625f5a0ad2c186b2c1cc54dc71d4617d97 (patch) | |
| tree | 4dc2a02009065bb259f6995dd6da95bf17040804 /src/doc/rustc-dev-guide | |
| parent | c5d31c8b2ee53216e6053fd6c522d8eecdd0c51a (diff) | |
| download | rust-847b89625f5a0ad2c186b2c1cc54dc71d4617d97.tar.gz rust-847b89625f5a0ad2c186b2c1cc54dc71d4617d97.zip | |
Fix `is_diagnostic_item()` example
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/diagnostics/diagnostic-items.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/rustc-dev-guide/src/diagnostics/diagnostic-items.md b/src/doc/rustc-dev-guide/src/diagnostics/diagnostic-items.md index 78fdd032d1a..9360427d660 100644 --- a/src/doc/rustc-dev-guide/src/diagnostics/diagnostic-items.md +++ b/src/doc/rustc-dev-guide/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, } } |
